lkml.org 
[lkml]   [2009]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/10] writeback: stop background writeback when below background threshold
On Fri, Sep 25, 2009 at 12:26:00AM +0800, Peter Zijlstra wrote:
> On Thu, 2009-09-24 at 18:13 +0200, Jens Axboe wrote:
>
> > > > > for (;;) {
> > > > > /*
> > > > > + * Stop writeback when nr_pages has been consumed
> > > > > */
> > > > > + if (args->nr_pages <= 0)
> > > > > break;
> > > > >
> > > > > /*
> > > > > + * For background writeout, stop when we are below the
> > > > > + * background dirty threshold
> > > > > */
> > > > > + if (args->for_background && !over_bground_thresh())
> > > > > break;
> > > >
> > > >
> > > > What I'm not getting is why this is conditional on for_background(),
> > > > shouldn't we always stop writeback when below the background threshold?
> > >
> > > Ah, that would be for things like sync, which need to write out
> > > everything, right?

Besides sync, it's reasonable for periodic writeback to write all
inodes as long as they are expired.

> > Yes, wb_writeback() handles any kind of writeback. The definition of our
> > background writeout is to stop when we are no longer over the background
> > writeout threshold.
>
> Right, ok
>
> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

Thanks! This patch was partly inspired by your comments :)

Regards,
Fengguang


\
 
 \ /
  Last update: 2009-09-25 02:49    [from the cache]
©2003-2011 Jasper Spaans