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    [W:0.018 / U:0.080 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site