[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110223191658.GV2163@linux.vnet.ibm.com>
Date: Wed, 23 Feb 2011 11:16:58 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Christoph Lameter <cl@...ux.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Frederic Weisbecker <fweisbec@...il.com>,
linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
peterz@...radead.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
eric.dumazet@...il.com, darren@...art.com,
"Paul E. McKenney" <paul.mckenney@...aro.org>
Subject: Re: [PATCH RFC tip/core/rcu 11/11] rcu: move TREE_RCU from softirq
to kthread
On Wed, Feb 23, 2011 at 12:29:59PM -0600, Christoph Lameter wrote:
> On Wed, 23 Feb 2011, Steven Rostedt wrote:
>
> > On Wed, 2011-02-23 at 11:34 -0600, Christoph Lameter wrote:
> >
> > > > > True, but we could also argue that the multiple checks for being preempt
> > > > > can also be an issue.
> > > >
> > > > At least on x86 preemption don't actually need to be disabled: selection
> > > > of the right per-cpu memory location is done atomically with the rest of
> > > > the instruction by the segment selector.
> > >
> > > Right.
> >
> > But a test still needs to be made. Because three access of this_cpu_*()
> > that gets preempted and scheduled on another CPU can access a different
> > CPU var for each access. This does not matter how atomic the
> > this_cpu_*() code is.
>
> Right if the kthread context can be rescheduled then either preemption
> needs to be disabled to guarantee that all three access the same per cpu
> area data or the code needs to be changed in such a way that a this_cpu
> RMW instructions can do the mods in one go.
Reschedules can happen in this case due to CPU hotplug events. :-(
Thanx, Paul
--
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