The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] f2fs: reduce zoned LFS memory by sharing SIT valid maps
@ 2026-03-09 10:36 'wallentx
  2026-03-09 10:36 ` [RFC PATCH 1/3] f2fs: prepare cur_valid_map for safe lockless access 'wallentx
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: 'wallentx @ 2026-03-09 10:36 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: jaegeuk, chao, linux-kernel, wallentx

From: wallentx <william.allentx@gmail.com>

This series reduces SIT-related memory overhead on zoned F2FS.

For zoned devices, F2FS operates in LFS mode. In that configuration SSR
is not used, IPU is not allowed, and discard defaults to section
granularity. That leaves a large amount of per-segment SIT bitmap
storage representing segments that are trivially empty or trivially
full.

The core change lets empty and fully valid segments reuse shared
zero/full SIT valid maps, while active or partial segments keep private
maps.

The series is split as follows:

  - [1/3] prepare lockless cur_valid_map readers for later pointer
    replacement
  - [2/3] introduce shared zero/full SIT valid maps for zoned LFS, keep
    private maps only for active or partial segments, invalidate scanned
    SIT metadata pages after mount-time rebuild, and reject
    checkpoint=disable because its accounting model does not fit the
    collapsed shared-SIT representation
  - [3/3] add shared_sit_check/noshared_sit_check to make the remaining
    CONFIG_F2FS_CHECK_FS mirror overhead optional without changing the
    default behavior

On a test system with 43 HM-SMR zoned volumes (~550 TB total) and
CONFIG_F2FS_CHECK_FS=y, static F2FS memory on top of jaegeuk/f2fs dev
at 5f04e90eedd0 changed as follows:

  - current behavior: 58.91 GiB
  - patch 2: 27.70 GiB
  - patch 2 + patch 3 with noshared_sit_check: 12.10 GiB

The same design has also been exercised for several months on a kernel
based on v6.18 on the same host. This series has also been built,
booted, and measured on top of jaegeuk/f2fs dev at 5f04e90eedd0.

Feedback is especially welcome on:

  - the 3-way split
  - the checkpoint=disable restriction in shared-SIT mode
  - whether shared_sit_check/noshared_sit_check is the right interface
    for the remaining CHECK_FS mirror cost

wallentx (3):
  f2fs: prepare cur_valid_map for safe lockless access
  f2fs: reduce zoned LFS memory by sharing SIT valid maps
  f2fs: add mount option to disable shared SIT mirror checks

 Documentation/filesystems/f2fs.rst |  11 +
 fs/f2fs/checkpoint.c               |   4 +-
 fs/f2fs/debug.c                    |  21 +-
 fs/f2fs/f2fs.h                     |  22 ++
 fs/f2fs/gc.c                       |  29 +-
 fs/f2fs/segment.c                  | 436 ++++++++++++++++++++++++-----
 fs/f2fs/segment.h                  |  31 +-
 fs/f2fs/super.c                    |  25 ++
 fs/f2fs/sysfs.c                    |   8 +-
 9 files changed, 494 insertions(+), 93 deletions(-)

-- 
2.53.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-14  5:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 10:36 [RFC PATCH 0/3] f2fs: reduce zoned LFS memory by sharing SIT valid maps 'wallentx
2026-03-09 10:36 ` [RFC PATCH 1/3] f2fs: prepare cur_valid_map for safe lockless access 'wallentx
2026-03-09 10:36 ` [RFC PATCH 2/3] f2fs: reduce zoned LFS memory by sharing SIT valid maps 'wallentx
2026-03-14  5:08   ` Chao Yu
2026-03-09 10:37 ` [RFC PATCH 3/3] f2fs: add mount option to disable shared SIT mirror checks 'wallentx
2026-03-14  5:14   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox