Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-05-29 Thread Andrew Morton
On Thu, 29 May 2025 16:44:51 +0530 Kundan Kumar wrote: > Currently, pagecache writeback is performed by a single thread. Inodes > are added to a dirty list, and delayed writeback is triggered. The single > writeback thread then iterates through the dirty inode list, and executes > the writeback.

[f2fs-dev] [PATCH] f2fs: make sure zoned device GC to use FG_GC in shortage of free section

2025-05-29 Thread Daeho Jeong
From: Daeho Jeong We already use FG_GC when we have free sections under gc_boost_zoned_gc_percent. So, let's make it consistent. Signed-off-by: Daeho Jeong --- fs/f2fs/gc.c | 2 +- fs/f2fs/segment.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/

[f2fs-dev] [PATCH] f2fs: turn off one_time when forcibly set to foreground GC

2025-05-29 Thread Daeho Jeong
From: Daeho Jeong one_time mode is only for background GC. So, we need to set it back to false when foreground GC is enforced. Signed-off-by: Daeho Jeong --- fs/f2fs/gc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 2b8f9239bede..f752dec71e45 100644 ---

[f2fs-dev] [GIT PULL] f2fs update for 6.16-rc1

2025-05-29 Thread Jaegeuk Kim via Linux-f2fs-devel
Hi Linus, Could you please consider this pull request? Thanks, The following changes since commit 0af2f6be1b4281385b618cb86ad946eded089ac8: Linux 6.15-rc1 (2025-04-06 13:11:33 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git ta

[f2fs-dev] [PATCH 12/13] nfs: add support in nfs to handle multiple writeback contexts

2025-05-29 Thread Kundan Kumar
Fetch writeback context to which an inode is affined. Use it to perform writeback related operations. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/nfs/internal.h | 5 +++-- fs/nfs/write.c| 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/nfs/intern

[f2fs-dev] [PATCH 13/13] writeback: set the num of writeback contexts to number of online cpus

2025-05-29 Thread Kundan Kumar
We create N number of writeback contexts, N = number of online cpus. The inodes gets distributed across different writeback contexts, enabling parallel writeback. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-05-29 Thread Kundan Kumar
Currently, pagecache writeback is performed by a single thread. Inodes are added to a dirty list, and delayed writeback is triggered. The single writeback thread then iterates through the dirty inode list, and executes the writeback. This series parallelizes the writeback by allowing multiple writ

[f2fs-dev] [PATCH 09/13] f2fs: add support in f2fs to handle multiple writeback contexts

2025-05-29 Thread Kundan Kumar
Add support to handle multiple writeback contexts and check for dirty_exceeded across all the writeback contexts. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/f2fs/node.c| 11 +++ fs/f2fs/segment.h | 7 +-- 2 files changed, 12 insertions(+), 6 deletions(-) diff

[f2fs-dev] [PATCH 05/13] writeback: modify bdi_writeback search logic to search across all wb ctxs

2025-05-29 Thread Kundan Kumar
Since we have multiple cgwb per bdi, embedded in writeback_ctx now, we iterate over all of them to find the associated writeback. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/fs-writeback.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/fs-writeback

[f2fs-dev] [PATCH 10/13] fuse: add support for multiple writeback contexts in fuse

2025-05-29 Thread Kundan Kumar
Fetch writeback context to which an inode is affined. Use it to perform writeback related operations. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/fuse/file.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 78172

[f2fs-dev] [PATCH 07/13] writeback: modify sync related functions to iterate over all writeback contexts

2025-05-29 Thread Kundan Kumar
Modify sync related functions to iterate over all writeback contexts. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/fs-writeback.c | 66 +++ 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-write

[f2fs-dev] [PATCH 08/13] writeback: add support to collect stats for all writeback ctxs

2025-05-29 Thread Kundan Kumar
Modified stats collection to collect stats for all the writeback contexts within a bdi. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- mm/backing-dev.c | 72 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/mm/backing-de

[f2fs-dev] [PATCH 01/13] writeback: add infra for parallel writeback

2025-05-29 Thread Kundan Kumar
This is a prep patch which introduces a new bdi_writeback_ctx structure that enables us to have multiple writeback contexts for parallel writeback. Each bdi now can have multiple writeback contexts, with each writeback context having has its own cgwb tree. Modify all the functions/places that oper

[f2fs-dev] [PATCH 03/13] writeback: link bdi_writeback to its corresponding bdi_writeback_ctx

2025-05-29 Thread Kundan Kumar
Introduce a bdi_writeback_ctx field in bdi_writeback. This helps in fetching the writeback context from the bdi_writeback. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- mm/backing-dev.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mm/backing-dev.

[f2fs-dev] [PATCH 11/13] gfs2: add support in gfs2 to handle multiple writeback contexts

2025-05-29 Thread Kundan Kumar
Add support to handle multiple writeback contexts and check for dirty_exceeded across all the writeback contexts Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/gfs2/super.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/super.c b/fs/gfs2/su

[f2fs-dev] [PATCH 02/13] writeback: add support to initialize and free multiple writeback ctxs

2025-05-29 Thread Kundan Kumar
Introduce a new macro for_each_bdi_wb_ctx to iterate over multiple writeback ctxs. Added logic for allocation, init, free, registration and unregistration of multiple writeback contexts within a bdi. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- include/linux/backing-dev.h | 4 ++

[f2fs-dev] [PATCH 06/13] writeback: invoke all writeback contexts for flusher and dirtytime writeback

2025-05-29 Thread Kundan Kumar
Modify flusher and dirtytime logic to iterate through all the writeback contexts. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta --- fs/fs-writeback.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 72b73c3

[f2fs-dev] [PATCH 04/13] writeback: affine inode to a writeback ctx within a bdi

2025-05-29 Thread Kundan Kumar
Affine inode to a writeback context. This helps in minimizing the filesytem fragmentation due to inode being processed by different threads. Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Suggested-by: Ritesh Harjani (IBM) --- fs/fs-writeback.c | 3 ++- include/linux/backing-d