From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Zhiguo Niu <zhiguo.niu@unisoc.com>, jaegeuk@kernel.org
Cc: ke.wang@unisoc.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, Hao_hao.Wang@unisoc.com
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_MID
Date: Wed, 23 Oct 2024 10:42:23 +0800 [thread overview]
Message-ID: <28ad2c90-a95c-440a-ae6a-5fb19bacd252@kernel.org> (raw)
In-Reply-To: <1729588481-29390-1-git-send-email-zhiguo.niu@unisoc.com>
On 2024/10/22 17:14, Zhiguo Niu wrote:
> GC_URGENT_MID is introduced by commit
> d98af5f45520 ("f2fs: introduce gc_urgent_mid mode"), aim to does GC
> forcibly uses cost benefit GC approach, but if ATGC is enabled at
> the same time, Age-threshold approach will be selected, which can only
> do amount of GC and it is much less than the numbers of CB approach.
gc urgent low(2): lowers the bar of checking I/O idling in
order to process outstanding discard commands and GC a
little bit aggressively. uses cost benefit GC approach.
GC_URGENT_LOW uses CB algorithm as well?
Thanks,
>
> some traces:
> f2fs_gc-254:48-396 [007] ..... 2311600.684028: f2fs_gc_begin: dev = (254,48), gc_type = Background GC, no_background_GC = 0, nr_free_secs = 0, nodes = 1053, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:0
> f2fs_gc-254:48-396 [007] ..... 2311600.684527: f2fs_get_victim: dev = (254,48), type = No TYPE, policy = (Background GC, LFS-mode, Age-threshold), victim = 10, cost = 4294364975, ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 44898
> f2fs_gc-254:48-396 [007] ..... 2311600.714835: f2fs_gc_end: dev = (254,48), ret = 0, seg_freed = 0, sec_freed = 0, nodes = 1562, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:0
> f2fs_gc-254:48-396 [007] ..... 2311600.714843: f2fs_background_gc: dev = (254,48), wait_ms = 50, prefree = 0, free = 44898
> f2fs_gc-254:48-396 [007] ..... 2311600.771785: f2fs_gc_begin: dev = (254,48), gc_type = Background GC, no_background_GC = 0, nr_free_secs = 0, nodes = 1562, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:
> f2fs_gc-254:48-396 [007] ..... 2311600.772275: f2fs_gc_end: dev = (254,48), ret = -61, seg_freed = 0, sec_freed = 0, nodes = 1562, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:0
>
> Fixes: d98af5f45520 ("f2fs: introduce gc_urgent_mid mode")
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
> fs/f2fs/gc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index e40bdd1..daecf69 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -257,6 +257,7 @@ static int select_gc_type(struct f2fs_sb_info *sbi, int gc_type)
>
> switch (sbi->gc_mode) {
> case GC_IDLE_CB:
> + case GC_URGENT_MID:
> gc_mode = GC_CB;
> break;
> case GC_IDLE_GREEDY:
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao@kernel.org>
To: Zhiguo Niu <zhiguo.niu@unisoc.com>, jaegeuk@kernel.org
Cc: Chao Yu <chao@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, niuzhiguo84@gmail.com,
ke.wang@unisoc.com, Hao_hao.Wang@unisoc.com
Subject: Re: [PATCH] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_MID
Date: Wed, 23 Oct 2024 10:42:23 +0800 [thread overview]
Message-ID: <28ad2c90-a95c-440a-ae6a-5fb19bacd252@kernel.org> (raw)
In-Reply-To: <1729588481-29390-1-git-send-email-zhiguo.niu@unisoc.com>
On 2024/10/22 17:14, Zhiguo Niu wrote:
> GC_URGENT_MID is introduced by commit
> d98af5f45520 ("f2fs: introduce gc_urgent_mid mode"), aim to does GC
> forcibly uses cost benefit GC approach, but if ATGC is enabled at
> the same time, Age-threshold approach will be selected, which can only
> do amount of GC and it is much less than the numbers of CB approach.
gc urgent low(2): lowers the bar of checking I/O idling in
order to process outstanding discard commands and GC a
little bit aggressively. uses cost benefit GC approach.
GC_URGENT_LOW uses CB algorithm as well?
Thanks,
>
> some traces:
> f2fs_gc-254:48-396 [007] ..... 2311600.684028: f2fs_gc_begin: dev = (254,48), gc_type = Background GC, no_background_GC = 0, nr_free_secs = 0, nodes = 1053, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:0
> f2fs_gc-254:48-396 [007] ..... 2311600.684527: f2fs_get_victim: dev = (254,48), type = No TYPE, policy = (Background GC, LFS-mode, Age-threshold), victim = 10, cost = 4294364975, ofs_unit = 1, pre_victim_secno = -1, prefree = 0, free = 44898
> f2fs_gc-254:48-396 [007] ..... 2311600.714835: f2fs_gc_end: dev = (254,48), ret = 0, seg_freed = 0, sec_freed = 0, nodes = 1562, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:0
> f2fs_gc-254:48-396 [007] ..... 2311600.714843: f2fs_background_gc: dev = (254,48), wait_ms = 50, prefree = 0, free = 44898
> f2fs_gc-254:48-396 [007] ..... 2311600.771785: f2fs_gc_begin: dev = (254,48), gc_type = Background GC, no_background_GC = 0, nr_free_secs = 0, nodes = 1562, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:
> f2fs_gc-254:48-396 [007] ..... 2311600.772275: f2fs_gc_end: dev = (254,48), ret = -61, seg_freed = 0, sec_freed = 0, nodes = 1562, dents = 2, imeta = 18, free_sec:44898, free_seg:44898, rsv_seg:239, prefree_seg:0
>
> Fixes: d98af5f45520 ("f2fs: introduce gc_urgent_mid mode")
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
> fs/f2fs/gc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index e40bdd1..daecf69 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -257,6 +257,7 @@ static int select_gc_type(struct f2fs_sb_info *sbi, int gc_type)
>
> switch (sbi->gc_mode) {
> case GC_IDLE_CB:
> + case GC_URGENT_MID:
> gc_mode = GC_CB;
> break;
> case GC_IDLE_GREEDY:
next prev parent reply other threads:[~2024-10-23 2:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 9:14 [f2fs-dev] [PATCH] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_MID Zhiguo Niu
2024-10-22 9:14 ` Zhiguo Niu
2024-10-23 2:42 ` Chao Yu via Linux-f2fs-devel [this message]
2024-10-23 2:42 ` Chao Yu
2024-10-23 2:49 ` [f2fs-dev] " Zhiguo Niu
2024-10-23 2:49 ` Zhiguo Niu
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=28ad2c90-a95c-440a-ae6a-5fb19bacd252@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=Hao_hao.Wang@unisoc.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=ke.wang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zhiguo.niu@unisoc.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.