From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, fengguang.wu@intel.com,
shaohua.li@intel.com, chris.mason@oracle.com, jack@suse.cz
Subject: Re: [PATCH 03/10] writeback: stop background writeback when below background threshold
Date: Thu, 24 Sep 2009 17:03:35 +0200 [thread overview]
Message-ID: <1253804615.18939.36.camel@laptop> (raw)
In-Reply-To: <1253803236-20760-4-git-send-email-jens.axboe@oracle.com>
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?
next prev parent reply other threads:[~2009-09-24 15:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-24 14:40 [PATCH 0/10] Current writeback patch queue Jens Axboe
2009-09-24 14:40 ` [PATCH 01/10] fs: Fix busyloop in wb_writeback() Jens Axboe
2009-09-25 0:48 ` Wu Fengguang
2009-09-24 14:40 ` [PATCH 02/10] writeback: balance_dirty_pages() shall write more than dirtied pages Jens Axboe
2009-09-24 15:03 ` Peter Zijlstra
2009-09-24 14:40 ` [PATCH 03/10] writeback: stop background writeback when below background threshold Jens Axboe
2009-09-24 15:03 ` Peter Zijlstra [this message]
2009-09-24 15:18 ` Peter Zijlstra
2009-09-24 16:13 ` Jens Axboe
2009-09-24 16:26 ` Peter Zijlstra
2009-09-25 0:47 ` Wu Fengguang
2009-09-24 14:40 ` [PATCH 04/10] writeback: kupdate writeback shall not stop when more io is possible Jens Axboe
2009-09-24 14:40 ` [PATCH 05/10] writeback: cleanup writeback_single_inode() Jens Axboe
2009-09-24 14:40 ` [PATCH 06/10] writeback: improve readability of the wb_writeback() continue/break logic Jens Axboe
2009-09-25 0:52 ` Wu Fengguang
2009-09-24 14:40 ` [PATCH 07/10] writeback: get rid to incorrect references to pdflush in comments Jens Axboe
2009-09-24 14:40 ` [PATCH 08/10] writeback: move inodes from one super_block together Jens Axboe
2009-09-24 14:40 ` [PATCH 09/10] writeback: don't resort for a single super_block in move_expired_inodes() Jens Axboe
2009-09-24 14:40 ` [PATCH 10/10] writeback: make the super_block pinning more efficient Jens Axboe
2009-09-25 2:55 ` [PATCH 0/10] Current writeback patch queue Wu Fengguang
2009-09-25 4:06 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1253804615.18939.36.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=chris.mason@oracle.com \
--cc=fengguang.wu@intel.com \
--cc=jack@suse.cz \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox