Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466444

Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick dependency for offline cpu

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick dependency for offline cpu
Date 2016-08-19 16:00 +0200
Message-ID <s7SuZ-6kb-23@gated-at.bofh.it> (permalink)
References <s5gWS-8h2-7@gated-at.bofh.it> <s7S1Y-68X-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-08-19 21:25 GMT+08:00 Peter Zijlstra <peterz@infradead.org>:
> On Fri, Aug 12, 2016 at 05:24:03PM +0800, Wanpeng Li wrote:
>
>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>> index d091f4a..ce0fb00 100644
>> --- a/kernel/sched/deadline.c
>> +++ b/kernel/sched/deadline.c
>> @@ -641,6 +641,11 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
>>               goto unlock;
>>       }
>>
>> +#ifdef CONFIG_SMP
>> +     if (unlikely(!rq->online))
>> +             goto offline;
>> +#endif
>> +
>>       enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
>>       if (dl_task(rq->curr))
>>               check_preempt_curr_dl(rq, p, 0);
>> @@ -648,6 +653,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
>>               resched_curr(rq);
>>
>>  #ifdef CONFIG_SMP
>> +offline:
>>       /*
>>        * Perform balancing operations here; after the replenishments.  We
>>        * cannot drop rq->lock before this, otherwise the assertion in
>> @@ -659,6 +665,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
>>        * XXX figure out if select_task_rq_dl() deals with offline cpus.
>>        */
>>       if (unlikely(!rq->online)) {
>> +             replenish_dl_entity(dl_se, dl_se);
>>               lockdep_unpin_lock(&rq->lock, rf.cookie);
>>               rq = dl_task_offline_migration(rq, p);
>
> So I don't like this, even if it magically works. With this we end up
> calling dl_task_offline_migration() -> deactivate_task() while the task
> isn't on the runqueue at all.

So how about v1, it also works :), https://lkml.org/lkml/2016/8/10/898

Regards,
Wanpeng Li

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3] sched/deadline: Fix the intention to re-evalute tick dependency for offline cpu Wanpeng Li <kernellwp@gmail.com> - 2016-08-12 11:30 +0200
  Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick  dependency for offline cpu Wanpeng Li <kernellwp@gmail.com> - 2016-08-16 04:10 +0200
  Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick  dependency for offline cpu Peter Zijlstra <peterz@infradead.org> - 2016-08-19 15:30 +0200
    Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick  dependency for offline cpu Wanpeng Li <kernellwp@gmail.com> - 2016-08-19 16:00 +0200

csiph-web