[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110829182836.GI9748@somewhere.redhat.com>
Date: Mon, 29 Aug 2011 20:28:38 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Anton Blanchard <anton@....ibm.com>,
Avi Kivity <avi@...hat.com>, Ingo Molnar <mingo@...e.hu>,
Lai Jiangshan <laijs@...fujitsu.com>,
"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
Stephen Hemminger <shemminger@...tta.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tim Pepper <lnxninja@...ux.vnet.ibm.com>,
Paul Menage <paul@...lmenage.org>
Subject: Re: [PATCH 13/32] nohz: Adaptive tick stop and restart on nohz cpuset
On Mon, Aug 29, 2011 at 08:07:10PM +0200, Peter Zijlstra wrote:
> On Mon, 2011-08-29 at 20:02 +0200, Frederic Weisbecker wrote:
> > On Mon, Aug 29, 2011 at 05:28:09PM +0200, Peter Zijlstra wrote:
> > > On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> > > > +bool cpuset_nohz_can_stop_tick(void)
> > > > +{
> > > > + struct rq *rq;
> > > > +
> > > > + rq = this_rq();
> > > > +
> > > > + /* More than one running task need preemption */
> > > > + if (rq->nr_running > 1)
> > > > + return false;
> > > > +
> > > > + return true;
> > > > +}
> > >
> > > int sched_needs_cpu(int cpu), seems the right name, matches the existing
> > > {rcu,printk,arch}_needs_cpu() functions.
> >
> > tick_nohz_stop_sched_tick() already handles that by keeping a periodic
> > behaviour if one of these conditions are met.
>
> What? tick_nohz_stop_sched_tick() most surely cannot access struct rq,
> so it cannot do the nr_running test.
I was talking about {rcu,printk,arch}_needs_cpu() functions.
>
> > It has also the upside to restore the periodic behaviour if needed
> > from irq return if the tick was stopped.
>
> Again, what?
If the tick is stopped then an irq fires and something calls printk() or call_rcu()
then on interrupt return, tick_nohz_stop_sched_tick() checks that
with {rcu,printk,arch}_needs_cpu() and restores a periodic behaviour
until nobody else needs the CPU.
--
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