[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1907081618270.4709@nanos.tec.linutronix.de>
Date: Mon, 8 Jul 2019 16:20:09 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Paul E. McKenney" <paulmck@...ux.ibm.com>
cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Ingo Molnar <mingo@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
x86 <x86@...nel.org>, Nadav Amit <namit@...are.com>,
Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH V2] cpu/hotplug: Cache number of online CPUs
On Mon, 8 Jul 2019, Paul E. McKenney wrote:
> On Mon, Jul 08, 2019 at 03:43:55PM +0200, Thomas Gleixner wrote:
> > Revaluating the bitmap wheight of the online cpus bitmap in every
>
> s/wheight/weight/?
>
> > invocation of num_online_cpus() over and over is a pretty useless
> > exercise. Especially when num_online_cpus() is used in code pathes like the
> > IPI delivery of x86 or the membarrier code.
> >
> > Cache the number of online CPUs in the core and just return the cached
> > variable.
>
> I do like this and the comments on limited guarantees make sense.
> One suggestion for saving a few lines below, but either way:
Nah. I have to redo it. Mathieu just pointed out in IRC that there is the
reboot and emergency/panic/kexec crap which calls set_cpu_online()
completely non serialized. Sigh....
Thanks,
tglx
Powered by blists - more mailing lists