lkml.org 
[lkml]   [2011]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/18] writeback: dirty position control - bdi reserve area
From
Date
On Wed, 2011-09-07 at 20:31 +0800, Wu Fengguang wrote:
> > > + x_intercept = min(write_bw, freerun);
> > > + if (bdi_dirty < x_intercept) {
> >
> > So the point of the freerun point is that we never throttle before it,
> > so basically all the below shouldn't be needed at all, right?
>
> Yes!
>
> > > + if (bdi_dirty > x_intercept / 8) {
> > > + pos_ratio *= x_intercept;
> > > + do_div(pos_ratio, bdi_dirty);
> > > + } else
> > > + pos_ratio *= 8;
> > > + }
> > > +
> > > return pos_ratio;
> > > }

Does that mean we can remove this whole block?

> >
> > So why not add:
> >
> > if (likely(dirty < freerun))
> > return 2;
> >
> > at the start of this function and leave it at that?
>
> Because we already has
>
> if (nr_dirty < freerun)
> break;
>
> in the main balance_dirty_pages() loop ;)

Bah! I keep missing that ;-)


\
 
 \ /
  Last update: 2011-09-12 12:23    [W:0.080 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site