[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140807163228.GX9918@twins.programming.kicks-ass.net>
Date: Thu, 7 Aug 2014 18:32:28 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org,
mingo@...nel.org, dipankar@...ibm.com, akpm@...ux-foundation.org,
mathieu.desnoyers@...icios.com, josh@...htriplett.org,
tglx@...utronix.de, rostedt@...dmis.org, dhowells@...hat.com,
edumazet@...gle.com, dvhart@...ux.intel.com, fweisbec@...il.com,
oleg@...hat.com, bobby.prani@...il.com
Subject: Re: [PATCH v3 tip/core/rcu 1/9] rcu: Add call_rcu_tasks()
On Thu, Aug 07, 2014 at 08:43:58AM -0700, Paul E. McKenney wrote:
> On Thu, Aug 07, 2014 at 10:49:21AM +0200, Peter Zijlstra wrote:
> > On Tue, Aug 05, 2014 at 02:55:10PM -0700, Paul E. McKenney wrote:
> > > +/* Check for nohz_full CPUs executing in userspace. */
> > > +static void check_no_hz_full_tasks(void)
> > > +{
> > > +#ifdef CONFIG_NO_HZ_FULL
> > > + int cpu;
> > > + struct task_struct *t;
> > > +
> > > + for_each_online_cpu(cpu) {
> > > + cond_resched();
> > > + rcu_read_lock();
> > > + t = rcu_dynticks_task_cur(cpu);
> > > + if (t == NULL || is_idle_task(t)) {
> > > + rcu_read_unlock();
> > > + continue;
> > > + }
> > > + if (ACCESS_ONCE(t->rcu_tasks_holdout))
> > > + ACCESS_ONCE(t->rcu_tasks_holdout) = 0;
> > > + rcu_read_unlock();
> > > + }
> > > +#endif /* #ifdef CONFIG_NO_HZ_FULL */
> > > +}
> >
> > That's not hotplug safe afaict, and I've no idea if someone pointed that
> > out already because people refuse to trim email and I can't be arsed to
> > wade through pages and pages of quoting.
>
> Hmmm... That does look a bit suspicious, now that you mention it.
> After all, if a CPU is offline, its idle tasks cannot be on a
> trampoline.
But what about a CPU that in the process of getting on-line, it started
when there still were trampolines but hasn't quite made it to full
'online' status when you do this check.
Similar for going offline I suppose, we start to go offline when there
were still trampolines and got missed in that check because we already
cleared the 'online' bit but we're not quite dead yet.
I couldn't find any serialization against either on or off lining of
CPUs.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists