Hi Juhyung,

On 2023/5/19 2:12, Juhyung Park wrote:
Hi Chao,

Thanks for the patch. I'll try it out on both my laptop and workstation soon.

Thank you! Let me know if you have any concern or suggestion. :)


One question though: would it make sense to see if it works fine on
Android too? (With userspace's explicit GC trigger disabled.)

I can see that huawei/honor are still using this feature, I remember that idle
urgent GC feature is not available and when this feature shipped in products.

I guess so, it's fine to use this feature in Android if manual GC from userspace
is disabled.

Thanks,

Maybe it could be an indication on whether it works properly or not?

Thanks,

On Thu, May 18, 2023 at 4:53 PM Chao Yu <c...@kernel.org> wrote:

On 2023/4/21 1:26, Juhyung Park wrote:
Hi Chao,

On Fri, Apr 21, 2023 at 1:19 AM Chao Yu <c...@kernel.org> wrote:

Hi JuHyung,

Sorry for delay reply.

On 2023/4/11 1:03, Juhyung Park wrote:
Hi Chao,

On Tue, Apr 11, 2023 at 12:44 AM Chao Yu <c...@kernel.org> wrote:

Hi Juhyung,

On 2023/4/4 15:36, Juhyung Park wrote:
Hi everyone,

I want to start a discussion on using f2fs for regular desktops/workstations.

There are growing number of interests in using f2fs as the general
root file-system:
2018: https://www.phoronix.com/news/GRUB-Now-Supports-F2FS
2020: https://www.phoronix.com/news/Clear-Linux-F2FS-Root-Option
2023: https://code.launchpad.net/~nexusprism/curtin/+git/curtin/+merge/439880
2023: https://code.launchpad.net/~nexusprism/grub/+git/ubuntu/+merge/440193

I've been personally running f2fs on all of my x86 Linux boxes since
2015, and I have several concerns that I think we need to collectively
address for regular non-Android normies to use f2fs:

A. Bootloader and installer support
B. Host-side GC
C. Extended node bitmap

I'll go through each one.

=== A. Bootloader and installer support ===

It seems that both GRUB and systemd-boot supports f2fs without the
need for a separate ext4-formatted /boot partition.
Some distros are seemingly disabling f2fs module for GRUB though for
security reasons:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1868664

It's ultimately up to the distro folks to enable this, and still in
the worst-case scenario, they can specify a separate /boot partition
and format it to ext4 upon installation.

The installer itself to show f2fs and call mkfs.f2fs is being worked
on currently on Ubuntu. See the 2023 links above.

Nothing f2fs mainline developers should do here, imo.

=== B. Host-side GC ===

f2fs relieves most of the device-side GC but introduces a new
host-side GC. This is extremely confusing for people who have no
background in SSDs and flash storage to understand, let alone
discard/trim/erase complications.

In most consumer-grade blackbox SSDs, device-side GCs are handled
automatically for various workloads. f2fs, however, leaves that
responsibility to the userspace with conservative tuning on the

We've proposed a f2fs feature named "space awared garbage collection"
and shipped it in huawei/honor's devices, but forgot to try upstreaming
it. :-P

In this feature, we introduced three mode:
- performance mode: something like write-gc in ftl, it can trigger
background gc more frequently and tune its speed according to free
segs and reclaimable blks ratio.
- lifetime mode: slow down background gc to avoid high waf if there
is less free space.
- balance mode: behave as usual.

I guess this may be helpful for Linux desktop distros since there is
no such storage service trigger gc_urgent.


That indeed sounds interesting.

If you need me to test something out, feel free to ask.

Thanks a lot for that. :)

I'm trying to figure out a patch...

Juhyung,

Are you interesting to try this patch in distros?

https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?h=dev-test&id=4736e55bc967e91cf8a275b678739b006c2617f0

There are some tunable parameters, I can export them via sysfs entry,
let me update later.

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to