[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1206141656040.3086@ionos>
Date: Thu, 14 Jun 2012 17:02:11 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Tejun Heo <tj@...nel.org>
Subject: Re: [RFC patch 2/5] smpboot: Provide infrastructure for percpu
hotplug threads
On Thu, 14 Jun 2012, Paul E. McKenney wrote:
> On Thu, Jun 14, 2012 at 03:32:19PM +0200, Thomas Gleixner wrote:
> > On Thu, 14 Jun 2012, Paul E. McKenney wrote:
> > > On Thu, Jun 14, 2012 at 01:20:39PM +0200, Thomas Gleixner wrote:
> > > > I gave it a quick shot, but I was not able to reproduce the hang yet.
> > >
> > > Really? I have a strictly Western-Hemisphere bug? ;-)
> >
> > I guess I need to fire up rcu torture to make it surface.
>
> A simple offline was triggering it for me. Perhaps some of my debug
> code was inappropriate, will retry.
>
> > > > But looking at the thread function made me look into rcu_yield() and I
> > > > really wonder what kind of drug induced that particular piece of
> > > > horror.
> > >
> > > When you are working on something like RCU priority boosting, no other
> > > drug is in any way necessary. ;-)
> >
> > And how do we protect minors from that ?
>
> We rely on their own sense of self-preservation preventing them from
> getting involved in such insanity.
>
> > > > I can't figure out why this yield business is necessary at all. The
> > > > commit logs are as helpful as the missing code comments :)
> > > >
> > > > I suspect that it's some starvation issue. But if we need it, then
> > > > can't we replace it with something sane like the (untested) patch
> > > > below?
> > >
> > > Yep, starvation. I will take a look at your approach after I wake
> > > up a bit more.
> >
> > Btw, if that simpler yield approach is working and I can't see why it
> > shouldn't then you can get rid of the node task as well. The only
> > purpose of it is to push up the priority of yielding tasks, right?
>
> It also boosts the priority of preempted RCU read-side critical sections.
Though the only way how this thread is invoked is via the timeout of
that yield timer. So I really have a hard time for understanding that.
cpu_kthread()
....
yield()
timer fires -> mark cpu in mask and wakeup node kthread
node_kthread()
do magic boost invocation
push priority of cpu_kthread marked in mask
For the boost thread it looks like:
boost_kthread()
.....
yield()
timer fires -> wakeup node kthread
node_kthread()
do magic boost invocation, but no prio adjustment of boost thread.
/me scratches head
--
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