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, 18 Jul 2008 22:38:55 +0800
From:	"eric miao" <eric.y.miao@...il.com>
To:	"Thomas Gleixner" <tglx@...utronix.de>
Cc:	"Ingo Molnar" <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	"Jack Ren" <jack.ren@...vell.com>,
	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Dmitry Adamushko" <dmitry.adamushko@...il.com>
Subject: Re: [PATCH] sched: do not stop ticks when cpu is not idle

On Fri, Jul 18, 2008 at 9:52 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Fri, 18 Jul 2008, Ingo Molnar wrote:
>>
>> * eric miao <eric.y.miao@...il.com> wrote:
>>
>> > Issue: the sched tick would be stopped in some race conditions.
>>
>> > --- a/kernel/sched.c
>> > +++ b/kernel/sched.c
>> > @@ -4027,7 +4027,8 @@ need_resched_nonpreemptible:
>> >             rq->nr_switches++;
>> >             rq->curr = next;
>> >             ++*switch_count;
>> > -
>> > +           if (rq->curr != rq->idle)
>> > +                   tick_nohz_restart_sched_tick();
>> >             context_switch(rq, prev, next); /* unlocks the rq */
>>
>> applied to tip/sched/urgent, thanks Eric.
>>
>> Thomas, Peter, Dmitry, do you concur with the analysis? (commit below)
>
> Yes. I did not understand the issue when Jack pointed it out to me,
> but with Erics explanation it's really clear. Thanks for tracking that
> down.

Actually, Jack did most of the analysis and came up with this quick
fix.

>
>> It looks a bit ugly to me in the middle of schedule() - is there no wait
>> to solve this within kernel/time/*.c ?
>
> Hmm, yes. I think the proper fix is to enable the tick stop mechanism
> in the idle loop and disable it before we go to schedule. That takes
> an additional parameter to tick_nohz_stop_sched_tick(), but we then
> gain a very clear section where the nohz mimic can be active.
>
> I'll whip up a patch.

Sounds great, thanks.

>
> Thanks,
>
>        tglx
>



-- 
Cheers
- eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ