All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yunlong Song <yunlong.song@huawei.com>
To: Chao Yu <yuchao0@huawei.com>, <jaegeuk@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>, <chao@kernel.org>
Subject: Re: [PATCH 3/3] f2fs: export migration_granularity sysfs entry
Date: Thu, 25 Oct 2018 11:01:35 +0800	[thread overview]
Message-ID: <a85b83ee-affb-138b-f804-0590eb2cd3be@huawei.com> (raw)
In-Reply-To: <20181024103728.9870-3-yuchao0@huawei.com>



On 2018/10/24 18:37, Chao Yu wrote:
> Add one sysfs entry to control migration granularity of GC in large
> section f2fs, it can be tuned to mitigate heavy overhead of migrating
> huge number of blocks in large section.
>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
>   Documentation/ABI/testing/sysfs-fs-f2fs | 9 +++++++++
>   fs/f2fs/sysfs.c                         | 7 +++++++
>   2 files changed, 16 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
> index 3ac41774ad3c..a7ce33199457 100644
> --- a/Documentation/ABI/testing/sysfs-fs-f2fs
> +++ b/Documentation/ABI/testing/sysfs-fs-f2fs
> @@ -92,6 +92,15 @@ Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
>   Description:
>   		 Controls the number of trials to find a victim segment.
>   
> +What:		/sys/fs/f2fs/<disk>/migration_granularity
> +Date:		October 2018
> +Contact:	"Chao Yu" <yuchao0@huawei.com>
> +Description:
> +		 Controls migration granularity of garbage collection on large
> +		 section, it can let GC move partial segment{s} of one section
> +		 in one GC cycle, so that dispersing heavy overhead GC to
> +		 multiple lightweight one.
> +
>   What:		/sys/fs/f2fs/<disk>/dir_level
>   Date:		March 2014
>   Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 240e4881279e..b393fda6d6dc 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -246,6 +246,11 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
>   		return count;
>   	}
>   
> +	if (!strcmp(a->attr.name, "discard_granularity")) {

Should be migration_granularity ?

> +		if (t == 0 || t > sbi->segs_per_sec)
> +			return -EINVAL;
> +	}
> +
>   	if (!strcmp(a->attr.name, "trim_sections"))
>   		return -EINVAL;
>   
> @@ -406,6 +411,7 @@ F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ram_thresh, ram_thresh);
>   F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ra_nid_pages, ra_nid_pages);
>   F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, dirty_nats_ratio, dirty_nats_ratio);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_victim_search, max_victim_search);
> +F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, migration_granularity, migration_granularity);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, dir_level, dir_level);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, cp_interval, interval_time[CP_TIME]);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, idle_interval, interval_time[REQ_TIME]);
> @@ -460,6 +466,7 @@ static struct attribute *f2fs_attrs[] = {
>   	ATTR_LIST(min_hot_blocks),
>   	ATTR_LIST(min_ssr_sections),
>   	ATTR_LIST(max_victim_search),
> +	ATTR_LIST(migration_granularity),
>   	ATTR_LIST(dir_level),
>   	ATTR_LIST(ram_thresh),
>   	ATTR_LIST(ra_nid_pages),

-- 
Thanks,
Yunlong Song



WARNING: multiple messages have this Message-ID (diff)
From: Yunlong Song <yunlong.song@huawei.com>
To: Chao Yu <yuchao0@huawei.com>, jaegeuk@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 3/3] f2fs: export migration_granularity sysfs entry
Date: Thu, 25 Oct 2018 11:01:35 +0800	[thread overview]
Message-ID: <a85b83ee-affb-138b-f804-0590eb2cd3be@huawei.com> (raw)
In-Reply-To: <20181024103728.9870-3-yuchao0@huawei.com>



On 2018/10/24 18:37, Chao Yu wrote:
> Add one sysfs entry to control migration granularity of GC in large
> section f2fs, it can be tuned to mitigate heavy overhead of migrating
> huge number of blocks in large section.
>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
>   Documentation/ABI/testing/sysfs-fs-f2fs | 9 +++++++++
>   fs/f2fs/sysfs.c                         | 7 +++++++
>   2 files changed, 16 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
> index 3ac41774ad3c..a7ce33199457 100644
> --- a/Documentation/ABI/testing/sysfs-fs-f2fs
> +++ b/Documentation/ABI/testing/sysfs-fs-f2fs
> @@ -92,6 +92,15 @@ Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
>   Description:
>   		 Controls the number of trials to find a victim segment.
>   
> +What:		/sys/fs/f2fs/<disk>/migration_granularity
> +Date:		October 2018
> +Contact:	"Chao Yu" <yuchao0@huawei.com>
> +Description:
> +		 Controls migration granularity of garbage collection on large
> +		 section, it can let GC move partial segment{s} of one section
> +		 in one GC cycle, so that dispersing heavy overhead GC to
> +		 multiple lightweight one.
> +
>   What:		/sys/fs/f2fs/<disk>/dir_level
>   Date:		March 2014
>   Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 240e4881279e..b393fda6d6dc 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -246,6 +246,11 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
>   		return count;
>   	}
>   
> +	if (!strcmp(a->attr.name, "discard_granularity")) {

Should be migration_granularity ?

> +		if (t == 0 || t > sbi->segs_per_sec)
> +			return -EINVAL;
> +	}
> +
>   	if (!strcmp(a->attr.name, "trim_sections"))
>   		return -EINVAL;
>   
> @@ -406,6 +411,7 @@ F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ram_thresh, ram_thresh);
>   F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ra_nid_pages, ra_nid_pages);
>   F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, dirty_nats_ratio, dirty_nats_ratio);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_victim_search, max_victim_search);
> +F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, migration_granularity, migration_granularity);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, dir_level, dir_level);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, cp_interval, interval_time[CP_TIME]);
>   F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, idle_interval, interval_time[REQ_TIME]);
> @@ -460,6 +466,7 @@ static struct attribute *f2fs_attrs[] = {
>   	ATTR_LIST(min_hot_blocks),
>   	ATTR_LIST(min_ssr_sections),
>   	ATTR_LIST(max_victim_search),
> +	ATTR_LIST(migration_granularity),
>   	ATTR_LIST(dir_level),
>   	ATTR_LIST(ram_thresh),
>   	ATTR_LIST(ra_nid_pages),

-- 
Thanks,
Yunlong Song

  reply	other threads:[~2018-10-25  3:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 10:37 [PATCH 1/3] f2fs: introduce __is_large_section() for cleanup Chao Yu
2018-10-24 10:37 ` Chao Yu
2018-10-24 10:37 ` [PATCH 2/3] f2fs: support subsectional garbage collection Chao Yu
2018-10-24 10:37   ` Chao Yu
2018-10-24 10:37 ` [PATCH 3/3] f2fs: export migration_granularity sysfs entry Chao Yu
2018-10-24 10:37   ` Chao Yu
2018-10-25  3:01   ` Yunlong Song [this message]
2018-10-25  3:01     ` Yunlong Song
2018-10-25  6:10     ` Chao Yu
2018-10-25  6:10       ` 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=a85b83ee-affb-138b-f804-0590eb2cd3be@huawei.com \
    --to=yunlong.song@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.