lkml.org 
[lkml]   [2011]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] writeback: dirty position control
Sorry forgot the 2 gnuplot figures, attached now.

> > Making our final function look like:
> >
> > s - x 3
> > f(x) := 1 + (-----)
> > l - s
>
> Very intuitive reasoning, thanks!
>
> I substituted real numbers to the function assuming a mem=2GB system.
>
> with limit=thresh:
>
> gnuplot> set xrange [60000:80000]
> gnuplot> plot 1 + (70000.0 - x)**3/(80000-70000.0)**3
>
> with limit=thresh+thresh/DIRTY_SCOPE
>
> gnuplot> set xrange [60000:90000]
> gnuplot> plot 1 + (70000.0 - x)**3/(90000-70000.0)**3
>
> Figures attached. The latter produces reasonably flat slope and I'll
> give it a spin in the dd tests :)
>
> > You can clamp it at [0,2] or so.
>
> Looking at the figures, we may even do without the clamp because it's
> already inside the range [0, 2].
>
> > The implementation wouldn't be too horrid either, something like:
> >
> > unsigned long bdi_pos_ratio(..)
> > {
> > if (dirty > limit)
> > return 0;
> >
> > if (dirty < 2*setpoint - limit)
> > return 2 * SCALE;
> >
> > x = SCALE * (setpoint - dirty) / (limit - setpoint);
> > xx = (x * x) / SCALE;
> > xxx = (xx * x) / SCALE;
> >
> > return xxx;
> > }
>
> Looks very neat, much simpler than the three curves solution!
>
> Thanks,
> Fengguang
[unhandled content-type:image/png][unhandled content-type:image/png]
\
 
 \ /
  Last update: 2011-08-12 05:23    [W:0.112 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site