From: Tal Zussman <tz2294@columbia.edu>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Jens Axboe <axboe@kernel.dk>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, io-uring@vger.kernel.org,
Tal Zussman <tz2294@columbia.edu>
Subject: [PATCH RFC 00/11] mm/filemap: split out folio wait and VFS code
Date: Wed, 20 May 2026 16:48:51 -0400 [thread overview]
Message-ID: <20260520-filemap-split-v1-0-c36ddc2b6cf2@columbia.edu> (raw)
mm/filemap.c has accumulated additional infrastructure over the years
that is not directly related to the page cache. It is currently nearly
5000 lines long. This series splits out the folio bit-lock and wait
queue code into separate files, and moves the VFS-level
generic_file_{read,write}_iter() family of files to fs/read_write.c, in
order to provide better separation of concerns. This also slims down
mm/filemap.c by ~1000 lines.
The folio wait infrastructure is centralized in mm/folio_wait.c and
include/linux/folio_wait.h, with functions moved from mm/filemap.c,
mm/page-writeback.c, and include/linux/pagemap.h. Afterwards, the code
is cleaned up a little, with functions and data types renamed to refer
to folios rather than pages.
generic_file_{read,write}_iter() implement the VFS-level read/write path
for filesystems, including support for direct I/O. These functions and
their helpers are moved to fs/read_write.c, along with other VFS-level
read/write functions. dir_pages() is also moved to include/linux/fs.h.
i_blocks_per_folio() is not moved from include/linux/pagemap.h, as it
requires folio_size(), which is not currently available in
include/linux/fs.h.
No functional change is intended.
Note: I have additional cleanups to mm/filemap.c ready to go, foremost
among them centralizing on the filemap_*() naming convention and making
the exposed page cache API clearer and more consistent, but I've split
these patches off from that in order to avoid sending these logically
separate patches to ~60 maintainers.
---
Tal Zussman (11):
mm: add folio_wake_writeback() helper
folio_wait: move folio bit-lock and wait implementation to mm/folio_wait.c
folio_wait: move folio bit-lock and wait declarations to include/linux/folio_wait.h
folio_wait: move folio_wait_writeback() family to mm/folio_wait.c
folio_wait: reformat comments and fix alignment
folio_wait: rename wait_page_* infrastructure to wait_folio_*
folio_wait: convert VM_BUG_ON_FOLIO() to VM_WARN_ON_ONCE_FOLIO()
MAINTAINERS: add folio_wait files to MEMORY MANAGEMENT - CORE
fs: move dir_pages() from <linux/pagemap.h> to <linux/fs.h>
fs: move generic_file_read_iter() to fs/read_write.c
fs: move generic_file_write_iter() family to fs/read_write.c
MAINTAINERS | 2 +
fs/read_write.c | 358 ++++++++++++++++
include/linux/folio_wait.h | 183 +++++++++
include/linux/fs.h | 19 +-
include/linux/pagemap.h | 184 +--------
io_uring/rw.c | 14 +-
io_uring/rw.h | 6 +-
mm/Makefile | 2 +-
mm/filemap.c | 993 +--------------------------------------------
mm/folio_wait.c | 710 ++++++++++++++++++++++++++++++++
mm/internal.h | 4 +
mm/page-writeback.c | 66 ---
12 files changed, 1285 insertions(+), 1256 deletions(-)
---
base-commit: e9add7501ad3297dad9b90ce201266830a68ab47
change-id: 20260511-filemap-split-871b5c18e98c
Best regards,
--
Tal Zussman <tz2294@columbia.edu>
next reply other threads:[~2026-05-20 20:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 20:48 Tal Zussman [this message]
2026-05-20 20:48 ` [PATCH RFC 01/11] mm: add folio_wake_writeback() helper Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 02/11] folio_wait: move folio bit-lock and wait implementation to mm/folio_wait.c Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 03/11] folio_wait: move folio bit-lock and wait declarations to include/linux/folio_wait.h Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 04/11] folio_wait: move folio_wait_writeback() family to mm/folio_wait.c Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 05/11] folio_wait: reformat comments and fix alignment Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 06/11] folio_wait: rename wait_page_* infrastructure to wait_folio_* Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 07/11] folio_wait: convert VM_BUG_ON_FOLIO() to VM_WARN_ON_ONCE_FOLIO() Tal Zussman
2026-05-20 20:48 ` [PATCH RFC 08/11] MAINTAINERS: add folio_wait files to MEMORY MANAGEMENT - CORE Tal Zussman
2026-05-20 20:49 ` [PATCH RFC 09/11] fs: move dir_pages() from <linux/pagemap.h> to <linux/fs.h> Tal Zussman
2026-05-20 20:49 ` [PATCH RFC 10/11] fs: move generic_file_read_iter() to fs/read_write.c Tal Zussman
2026-05-20 20:49 ` [PATCH RFC 11/11] fs: move generic_file_write_iter() family " Tal Zussman
2026-05-28 9:22 ` [PATCH RFC 00/11] mm/filemap: split out folio wait and VFS code Jan Kara
2026-05-28 11:04 ` Christian Brauner
2026-05-28 12:49 ` Christoph Hellwig
2026-05-29 22:54 ` Tal Zussman
2026-06-01 8:37 ` Christoph Hellwig
2026-05-29 22:26 ` Tal Zussman
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=20260520-filemap-split-v1-0-c36ddc2b6cf2@columbia.edu \
--to=tz2294@columbia.edu \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=david@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=jack@suse.cz \
--cc=liam@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/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
all inboxes | Powered by JetHome®