[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140116022251.GP10038@linux.vnet.ibm.com>
Date: Wed, 15 Jan 2014 18:22:51 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Josh Triplett <josh@...htriplett.org>,
Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
mingo@...nel.org, laijs@...fujitsu.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
dhowells@...hat.com, edumazet@...gle.com, darren@...art.com,
fweisbec@...il.com, sbw@....edu
Subject: Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers()
latency for empty list
On Wed, Jan 15, 2014 at 03:47:10PM -0500, Steven Rostedt wrote:
> On Wed, 15 Jan 2014 12:32:45 -0800
> Josh Triplett <josh@...htriplett.org> wrote:
>
> > On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote:
> > > forgot to mention...
> > >
> > > On 01/14, Paul E. McKenney wrote:
> > > >
> > > > +static bool catchup_timer_jiffies(struct tvec_base *base)
> > > > +{
> > > > +#ifdef CONFIG_NO_HZ_FULL
> > > > + if (!base->all_timers) {
> > > > + base->timer_jiffies = jiffies;
> > > > + return 1;
> > > > + }
> > > > +#endif /* #ifdef CONFIG_NO_HZ_FULL */
> > > > + return 0;
> > > > +}
> > >
> > > Do we really want ifdef?
> > >
> > > This check is cheap, and !CONFIG_NO_HZ_FULL case looks a bit
> > > strange because we still update ->all_timers for no reason.
> >
> > There's an easy way to improve this: instead of using an ifdef, put
> > "IS_ENABLED(CONFIG_NO_HZ_FULL) && " in the if condition.
>
> Why even bother with that? What's wrong with doing this check all the
> time? Looks like it will save of the normal case too.
Sold! I removed the ifdef.
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