lkml.org 
[lkml]   [2008]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch 6/7] cpusets: per cpuset dirty ratios
    From
    Date
    On Tue, 2008-10-28 at 09:08 -0700, David Rientjes wrote:

    > +/*
    > + * Determine the dirty ratios for the currently active cpuset
    > + */
    > +void cpuset_get_current_dirty_ratios(int *background, int *throttle)
    > +{
    > + mutex_lock(&callback_mutex);
    > + task_lock(current);
    > + *background = task_cs(current)->dirty_background_ratio;
    > + *throttle = task_cs(current)->cpuset_dirty_ratio;
    > + task_unlock(current);
    > + mutex_unlock(&callback_mutex);
    > +
    > + if (*background == -1)
    > + *background = dirty_background_ratio;
    > + if (*throttle == -1)
    > + *throttle = vm_dirty_ratio;
    > +}

    That's rather an awful lot of locking to read just two integers.




    \
     
     \ /
      Last update: 2008-10-30 09:47    [W:0.019 / U:89.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site