linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Yunlong Song <yunlong.song@huawei.com>,
	jaegeuk@kernel.org, chao@kernel.org, yunlong.song@icloud.com
Cc: miaoxie@huawei.com, bintian.wang@huawei.com,
	shengyong1@huawei.com, heyunlei@huawei.com,
	linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: fix heap mode to reset it back
Date: Mon, 29 Jan 2018 16:12:22 +0800	[thread overview]
Message-ID: <f89279f2-f397-f8b6-57e7-2e5c39d6256f@huawei.com> (raw)
In-Reply-To: <1517197065-156255-1-git-send-email-yunlong.song@huawei.com>

Hi Yunlong,

On 2018/1/29 11:37, Yunlong Song wrote:
> Commit 7a20b8a61eff81bdb7097a578752a74860e9d142 ("f2fs: allocate node
> and hot data in the beginning of partition") introduces another mount
> option, heap, to reset it back. But it does not do anything for heap
> mode, so fix it.

I think Jaegeuk did three things in that patch:
a) add missing heap mount option handling in ->show_options.
b) set noheap by default.
c) change allocation policy to the one that allocate hotdata & nodes in the
front of main are intensively.

They could be separated, independent, and I don't see such intention that
we can only use c) the new introduced allocation policy in noheap mode.

Anyway, I think Jaegeuk can help to double check that.

Thanks,

> 
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>  fs/f2fs/gc.c      | 5 +++--
>  fs/f2fs/segment.c | 3 ++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index aa720cc..b9d93fd 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -191,8 +191,9 @@ static void select_policy(struct f2fs_sb_info *sbi, int gc_type,
>  	if (gc_type != FG_GC && p->max_search > sbi->max_victim_search)
>  		p->max_search = sbi->max_victim_search;
>  
> -	/* let's select beginning hot/small space first */
> -	if (type == CURSEG_HOT_DATA || IS_NODESEG(type))
> +	/* let's select beginning hot/small space first in no_heap mode*/
> +	if (test_opt(sbi, NOHEAP) &&
> +		(type == CURSEG_HOT_DATA || IS_NODESEG(type)))
>  		p->offset = 0;
>  	else
>  		p->offset = SIT_I(sbi)->last_victim[p->gc_mode];
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index e5739ce..77a48c4 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -2167,7 +2167,8 @@ static unsigned int __get_next_segno(struct f2fs_sb_info *sbi, int type)
>  	if (sbi->segs_per_sec != 1)
>  		return CURSEG_I(sbi, type)->segno;
>  
> -	if (type == CURSEG_HOT_DATA || IS_NODESEG(type))
> +	if (test_opt(sbi, NOHEAP) &&
> +		(type == CURSEG_HOT_DATA || IS_NODESEG(type)))
>  		return 0;
>  
>  	if (SIT_I(sbi)->last_victim[ALLOC_NEXT])
> 

  reply	other threads:[~2018-01-29  8:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29  3:37 [PATCH] f2fs: fix heap mode to reset it back Yunlong Song
2018-01-29  8:12 ` Chao Yu [this message]
2018-01-29  8:31   ` Yunlong Song
2018-01-29  9:01     ` Chao Yu
2018-01-31  1:39       ` Jaegeuk Kim
2018-01-31  2:19         ` 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=f89279f2-f397-f8b6-57e7-2e5c39d6256f@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=bintian.wang@huawei.com \
    --cc=chao@kernel.org \
    --cc=heyunlei@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=shengyong1@huawei.com \
    --cc=yunlong.song@huawei.com \
    --cc=yunlong.song@icloud.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;
as well as URLs for NNTP newsgroup(s).