lkml.org 
[lkml]   [2011]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 1/3] sched: use jump labels to reduce overhead when bandwidth control is inactive
From
Date
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 ?


\
 
 \ /
  Last update: 2011-11-08 10:29    [from the cache]
©2003-2011 Jasper Spaans