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, 6 May 2020 11:28:56 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Alexandre Chartre <alexandre.chartre@...cle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Andy Lutomirski <luto@...nel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Brian Gerst <brgerst@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Will Deacon <will@...nel.org>
Subject: Re: [patch V4 part 1 03/36] sched: Clean up scheduler_ipi()

On Wed, May 06, 2020 at 05:33:00PM +0200, Peter Zijlstra wrote:
> On Wed, May 06, 2020 at 02:37:19PM +0200, Alexandre Chartre wrote:
> > On 5/5/20 3:16 PM, Thomas Gleixner wrote:
> > > @@ -650,6 +655,16 @@ static inline bool got_nohz_idle_kick(vo
> > >   	return false;
> > >   }
> > > +static void nohz_csd_func(void *info)
> > > +{
> > > +	struct rq *rq = info;
> > > +
> > > +	if (got_nohz_idle_kick()) {
> > > +		rq->idle_balance = 1;
> > > +		raise_softirq_irqoff(SCHED_SOFTIRQ);
> > > +	}
> > > +}
> > > +
> > >   #else /* CONFIG_NO_HZ_COMMON */
> > >   static inline bool got_nohz_idle_kick(void)
> 
> > >   #ifdef CONFIG_NO_HZ_COMMON
> > >   		rq->last_blocked_load_update_tick = jiffies;
> > >   		atomic_set(&rq->nohz_flags, 0);
> > > +
> > > +		rq_csd_init(rq, &rq->nohz_csd, nohz_csd_func);
> > >   #endif
> > >   #endif /* CONFIG_SMP */
> > >   		hrtick_rq_init(rq);
> > > --- a/kernel/sched/fair.c
> > > +++ b/kernel/sched/fair.c
> > > @@ -10009,12 +10009,11 @@ static void kick_ilb(unsigned int flags)
> > >   		return;
> > >   	/*
> > > -	 * Use smp_send_reschedule() instead of resched_cpu().
> > > -	 * This way we generate a sched IPI on the target CPU which
> > > +	 * This way we generate an IPI on the target CPU which
> > >   	 * is idle. And the softirq performing nohz idle load balance
> > >   	 * will be run before returning from the IPI.
> > >   	 */
> > > -	smp_send_reschedule(ilb_cpu);
> > > +	smp_call_function_single_async(ilb_cpu, &cpu_rq(ilb_cpu)->wake_csd);
> > 
> > This should be nohz_csd instead of wake_csd, no? I.e.:
> > 
> >        smp_call_function_single_async(ilb_cpu, &cpu_rq(ilb_cpu)->nohz_csd);
> 
> You figured correctly. Thanks!

And this does get rid of the smp_call_function splats I was seeing
earlier, thank you!

I still see warnings of the form "leave instruction with modified stack
frame" from older complilers and of the form "undefined stack state"
from newer compilers.  I am running stock objtool versions, so I am
guessing that this is at least one reason for these warnings.

							Thanx, Paul

Powered by blists - more mailing lists