From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
"linux-f2fs-devel@lists.sourceforge.net"
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH 1/3] f2fs-tools: give less overprovisioning space
Date: Mon, 24 Oct 2022 10:55:06 -0700 [thread overview]
Message-ID: <Y1bRepqUMmSbPwy4@google.com> (raw)
In-Reply-To: <20221021043008.puq6iizza4il3w6s@shindev>
On 10/21, Shinichiro Kawasaki wrote:
> On Oct 20, 2022 / 16:18, Jaegeuk Kim wrote:
>
> ...
>
> > Thanks, I think that fix looks good to me. I applied into the original patch.
> > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?h=dev&id=281d3e72370f6c39c0d57acaf37a7f0e003ddd28
>
> Oh, happy to know that the fix is good. And thank you for adding my SoB tag.
>
> One more thing, my fix missed care for fsck/resize.c. I suggest to apply one
> more hunk below to the commit in same manner as mkfs/f2fs_format.c.
>
> diff --git a/fsck/resize.c b/fsck/resize.c
> index c048b16..79945e1 100644
> --- a/fsck/resize.c
> +++ b/fsck/resize.c
> @@ -476,8 +476,8 @@ static void rebuild_checkpoint(struct f2fs_sb_info *sbi,
> get_cp(rsvd_segment_count)) *
> c.new_overprovision / 100);
>
> - if (get_cp(rsvd_segment_count) > get_cp(overprov_segment_count))
> - ASSERT_MSG("Cannot support wrong overprovision ratio\n");
> + if (get_cp(overprov_segment_count) < get_cp(rsvd_segment_count))
> + set_cp(overprov_segment_count, get_cp(rsvd_segment_count));
>
> DBG(0, "Info: Overprovision ratio = %.3lf%%\n", c.new_overprovision);
> DBG(0, "Info: Overprovision segments = %u (GC reserved = %u)\n",
>
> Without this change, the assert message "Cannot support wrong overprovision
> ratio" was printed when I ran resize.f2fs -t X command to the f2fs formatted
> with mkfs.f2fs -s Y. With the change above, the assert message is not printed.
Thanks, applied.
>
> >
> > >
> > > FYI, I tried to fix and created a patch which allows reserved segments larger
> > > than overprovisioning segments [1]. It compares those two, and take larger one
> > > to subtract from usable segments to get the segments for users. I confirmed it
> > > keeps small number of overprovisioning segments for no -s option case, and
> > > avoids the mkfs.f2fs failure for the -s option and zoned block device cases.
> > > However, it increases runtime of my test script which fills f2fs and do file
> > > overwrites to test f2fs GC on zoned block devices. It takes +60% longer runtime.
> > > Then GC performance looks worse than before, and this fix does not look good
> > > for me.
> >
> > I think you can try to avoid that by tuning /sys/fs/f2fs/xx/reserved_blocks?
>
> Thanks, I was able to shorten the runtime using the sysfs attribute. So the
> longer GC time was just caused by the smaller reserved segments size. Good.
>
> --
> Shin'ichiro Kawasaki
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-10-24 17:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 22:15 [f2fs-dev] [PATCH 1/3] f2fs-tools: give less overprovisioning space Jaegeuk Kim
2022-10-10 22:15 ` [f2fs-dev] [PATCH 2/3] fsck.f2fs: fix missing to assign c.zoned_model Jaegeuk Kim
2022-10-10 22:15 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: set host-aware zoned device similar to host-managed one Jaegeuk Kim
2022-10-20 9:07 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: give less overprovisioning space Shinichiro Kawasaki via Linux-f2fs-devel
2022-10-20 23:18 ` Jaegeuk Kim
2022-10-21 4:30 ` Shinichiro Kawasaki via Linux-f2fs-devel
2022-10-24 17:55 ` Jaegeuk Kim [this message]
2022-10-26 20:37 ` [f2fs-dev] [PATCH 1/3 v2] " 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=Y1bRepqUMmSbPwy4@google.com \
--to=jaegeuk@kernel.org \
--cc=Damien.LeMoal@wdc.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=shinichiro.kawasaki@wdc.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).