Re: [patch 1/3] sched: use jump labels to reduce overhead whenbandwidth control is inactive

From: Peter Zijlstra
Date: Tue Nov 08 2011 - 04:28:35 EST


On Tue, 2011-11-08 at 10:26 +0100, Peter Zijlstra wrote:
> On Mon, 2011-11-07 at 20:26 -0800, Paul Turner wrote:
> > +static void account_cfs_bandwidth_used(int enabled, int was_enabled)
> > +{
> > + /* only need to count groups transitioning between enabled/!enabled */
> > + if (enabled && !was_enabled)
> > + jump_label_inc(&__cfs_bandwidth_used);
> > + else if (!enabled && was_enabled)
> > + jump_label_dec(&__cfs_bandwidth_used);
> > +}
>
> Can't you use jump_label_enabled(&__cfs_bandwidth_used) to was_enabled ?

n/m I'm not awake yet..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/