linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changman Lee <cm224.lee@samsung.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 4/5] f2fs: write node pages if checkpoint is not doing
Date: Mon, 10 Nov 2014 16:37:58 +0900	[thread overview]
Message-ID: <20141110073758.GC14659@lcm> (raw)
In-Reply-To: <1415518569-20626-4-git-send-email-jaegeuk@kernel.org>

On Sat, Nov 08, 2014 at 11:36:08PM -0800, Jaegeuk Kim wrote:
> It needs to write node pages if checkpoint is not doing in order to avoid
> memory pressure.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/node.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 4ea2c47..6f514fb 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1314,10 +1314,12 @@ static int f2fs_write_node_page(struct page *page,
>  		return 0;
>  	}
>  
> -	if (wbc->for_reclaim)
> -		goto redirty_out;
> -
> -	down_read(&sbi->node_write);
> +	if (wbc->for_reclaim) {
> +		if (!down_read_trylock(&sbi->node_write))
> +			goto redirty_out;

Previously, we skipped write_page for reclaim path, but from now on, we
will write out node page to reclaim memory at any time except checkpoint.
We should remember it may occur to break merging bio.
Got it.

Reviewed-by: Changman Lee <cm224.lee@samsung.com>

> +	} else {
> +		down_read(&sbi->node_write);
> +	}
>  	set_page_writeback(page);
>  	write_node_page(sbi, page, &fio, nid, ni.blk_addr, &new_addr);
>  	set_node_addr(sbi, &ni, new_addr, is_fsync_dnode(page));
> -- 
> 2.1.1
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2014-11-10  7:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09  7:36 [PATCH 1/5] f2fs: disable roll-forward when active_logs = 2 Jaegeuk Kim
2014-11-09  7:36 ` [PATCH 2/5] f2fs: introduce the number of inode entries Jaegeuk Kim
2014-11-09  7:36 ` [PATCH 3/5] f2fs: control the memory footprint used by ino entries Jaegeuk Kim
2014-11-10  3:28   ` [f2fs-dev] " Changman Lee
2014-11-10  5:20     ` Jaegeuk Kim
2014-11-09  7:36 ` [PATCH 4/5] f2fs: write node pages if checkpoint is not doing Jaegeuk Kim
2014-11-10  7:37   ` Changman Lee [this message]
2014-11-09  7:36 ` [PATCH 5/5] f2fs: do not skip any writes under memory pressure Jaegeuk Kim
2014-11-10  9:54 ` [f2fs-dev] [PATCH 1/5] f2fs: disable roll-forward when active_logs = 2 Changman Lee
2014-11-10 15:07   ` Jaegeuk Kim
2014-11-11 22:43     ` [f2fs-dev] " Changman Lee
2014-11-14  1:21       ` Jaegeuk Kim

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=20141110073758.GC14659@lcm \
    --to=cm224.lee@samsung.com \
    --cc=jaegeuk@kernel.org \
    --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).