lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 19 Aug 2016 21:56:59 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>, Wanpeng Li <wanpeng.li@...mail.com>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@....com>,
        Luca Abeni <luca.abeni@...tn.it>,
        Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick
 dependency for offline cpu

2016-08-19 21:25 GMT+08:00 Peter Zijlstra <peterz@...radead.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ