linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Chao Yu <chao2.yu@samsung.com>
Cc: ??? <jaegeuk.kim@samsung.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix dirty page accounting when redirty
Date: Sat, 1 Mar 2014 11:26:43 +1100	[thread overview]
Message-ID: <20140301002643.GL30131@dastard> (raw)
In-Reply-To: <000001cf342a$95864830$c092d890$@samsung.com>

On Fri, Feb 28, 2014 at 10:12:05AM +0800, Chao Yu wrote:
> We should de-account dirty counters for page when redirty in ->writepage().
> 
> Wu Fengguang described in 'commit 971767caf632190f77a40b4011c19948232eed75':
> "writeback: fix dirtied pages accounting on redirty
> De-account the accumulative dirty counters on page redirty.
> 
> Page redirties (very common in ext4) will introduce mismatch between
> counters (a) and (b)
> 
> a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied
> b) NR_WRITTEN, BDI_WRITTEN
> 
> This will introduce systematic errors in balanced_rate and result in
> dirty page position errors (ie. the dirty pages are no longer balanced
> around the global/bdi setpoints)."
> 
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
>  fs/f2fs/checkpoint.c |    1 +
>  fs/f2fs/data.c       |    1 +
>  fs/f2fs/node.c       |    1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index c8516ee..f069249 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -178,6 +178,7 @@ no_write:
>  redirty_out:
>  	dec_page_count(sbi, F2FS_DIRTY_META);
>  	wbc->pages_skipped++;
> +	account_page_redirty(page);
>  	set_page_dirty(page);
>  	return AOP_WRITEPAGE_ACTIVATE;

redirty_page_for_writepage()?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2014-03-01  0:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  2:12 [PATCH] f2fs: fix dirty page accounting when redirty Chao Yu
2014-03-01  0:26 ` Dave Chinner [this message]
2014-03-01  2:35   ` Chao Yu

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=20140301002643.GL30131@dastard \
    --to=david@fromorbit.com \
    --cc=chao2.yu@samsung.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).