lkml.org 
[lkml]   [2011]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/5] writeback: dirty position control
    From
    Date
    On Sat, 2011-08-06 at 16:44 +0800, Wu Fengguang wrote:
    > +static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
    > + unsigned long thresh,
    > + unsigned long dirty,
    > + unsigned long bdi_thresh,
    > + unsigned long bdi_dirty)
    > +{
    > + unsigned long limit = hard_dirty_limit(thresh);
    > + unsigned long origin;
    > + unsigned long goal;
    > + unsigned long long span;
    > + unsigned long long pos_ratio; /* for scaling up/down the rate limit */
    > +
    > + if (unlikely(dirty >= limit))
    > + return 0;
    > +
    > + /*
    > + * global setpoint
    > + */
    > + goal = thresh - thresh / DIRTY_SCOPE;
    > + origin = 4 * thresh;
    > +
    > + if (unlikely(origin < limit && dirty > (goal + origin) / 2)) {
    > + origin = limit; /* auxiliary control line */
    > + goal = (goal + origin) / 2;
    > + pos_ratio >>= 1;

    use before init?


    \
     
     \ /
      Last update: 2011-08-08 15:49    [W:0.020 / U:30.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site