lkml.org 
[lkml]   [2009]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/10] writeback: stop background writeback when below background threshold
From
Date
On Thu, 2009-09-24 at 17:03 +0200, Peter Zijlstra wrote:
> On Thu, 2009-09-24 at 16:40 +0200, Jens Axboe wrote:
> > From: Wu Fengguang <fengguang.wu@intel.com>
> >
> > Treat bdi_start_writeback(0) as a special request to do background write,
> > and stop such work when we are below the background dirty threshold.
> >
> > Also simplify the (nr_pages <= 0) checks. Since we already pass in
> > nr_pages=LONG_MAX for WB_SYNC_ALL and background writes, we don't
> > need to worry about it being decreased to zero.
> >
> > Reported-by: Richard Kennedy <richard@rsk.demon.co.uk>
> > CC: Jan Kara <jack@suse.cz>
> > CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> > Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> > ---
>
> > @@ -720,20 +730,16 @@ static long wb_writeback(struct bdi_writeback *wb,
> >
> > 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?





\
 
 \ /
  Last update: 2009-09-24 17:21    [W:2.895 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site