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

From: Peter Zijlstra
Date: Tue Nov 08 2011 - 04:26:30 EST


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 ?
--
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/