[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87mx5kfy9g.fsf@rustcorp.com.au>
Date: Mon, 07 May 2012 13:17:23 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: paulmck@...ux.vnet.ibm.com,
"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
mathieu.desnoyers@...ymtl.ca, josh@...htriplett.org,
niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
eric.dumazet@...il.com, darren@...art.com, fweisbec@...il.com,
patches@...aro.org, "Paul E. McKenney" <paul.mckenney@...aro.org>,
venki@...gle.com, KOSAKI Motohiro <kosaki.motohiro@...il.com>
Subject: Re: [PATCH RFC tip/core/rcu 1/6] rcu: Stabilize use of num_online_cpus() for GP short circuit
On Tue, 24 Apr 2012 09:50:56 -0700, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:
> On Tue, Apr 24, 2012 at 09:05:20PM +0530, Srivatsa S. Bhat wrote:
>
> Thank you for looking this over!
>
> > On 04/23/2012 10:12 PM, Paul E. McKenney wrote:
> >
> > > From: "Paul E. McKenney" <paul.mckenney@...aro.org>
> > >
> > > The rcu_blocking_is_gp() function tests to see if there is only one
> > > online CPU, and if so, synchronize_sched() and friends become no-ops.
> > > However, for larger systems, num_online_cpus() scans a large vector,
> >
> >
> > Venki had posted a patch to optimize that by using a variable, so that we
> > don't calculate the value each and every time.
> > http://thread.gmane.org/gmane.linux.kernel/1240569/focus=1246659
> >
> > However, unfortunately there was some confusion around that patch and
> > even though it made it to akpm's tree and stayed there briefly, it didn't
> > go upstream. Venki had attempted to resolve the confusion here:
> > http://thread.gmane.org/gmane.linux.kernel/1240569/focus=1260702
>
> Having a single variable tracking the online state would be good,
> but as you say it isn't there yet.
I think you could have a flag set by a notifier, but you'd have to
re-think the races...
Cheers,
Rusty.
--
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