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  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:   Wed, 12 Apr 2017 17:50:23 -0700
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2] sched: Have do_idle() call __schedule() without
 enabling preemption

On Wed, Apr 12, 2017 at 08:40:00PM -0400, Steven Rostedt wrote:
> On Wed, 12 Apr 2017 16:48:59 -0700
> "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:
> > 
> > I don't understand why schedule_idle() needs a loop given that
> > schedule_preempt_disabled() doesn't have one, but other than
> 
> But it does:
> 
> void __sched schedule_preempt_disabled(void)
> {
> 	sched_preempt_enable_no_resched();
> 	schedule();
> 	preempt_disable();
> }
> 
> Where we have:
> 
> asmlinkage __visible void __sched schedule(void)
> {
> 	struct task_struct *tsk = current;
> 
> 	sched_submit_work(tsk);
> 	do {
> 		preempt_disable();
> 		__schedule(false);
> 		sched_preempt_enable_no_resched();
> 	} while (need_resched());
> }
> 
> Which makes:
> 
> void __sched schedule_preempt_disabled(void)
> {
> 	struct task_struct *tsk  = current;
> 
> 	scehdule_preempt_enable_no_resched();
> 	sched_submit_work(tsk);
> 	do {
> 		preempt_disable();
> 		__schedule(false);
> 		schedule_preempt_enable_no_resched();
> 	} while (need_resched());
> 	preempt_disable();
> }
> 
> My schedule_idle() is simply schedule_preempt_disabled() without the
> change in preemption and no call to sched_submit_work().

Ah, thank you!

> > that, for whatever it is worth, it looks good to me.
> 
> Does this mean I can change the Cc: to Acked-by: ?

Works for me!

Acked-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

> -- Steve
> 
> 
> > > +void __sched schedule_idle(void)
> > > +{
> > > +	do {
> > > +		__schedule(false);
> > > +	} while (need_resched());
> > > +}
> > > +
> 

Powered by blists - more mailing lists