diff options
author | Milos Nikic <nikic.milos@gmail.com> | 2025-08-25 21:38:08 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-09-01 21:21:08 +0200 |
commit | 5eda2dbdb1a3eaae70178df55b7e3d7508b15c9b (patch) | |
tree | 508ed0bd02868f4a31de63a60b5ea848ffcabd7b /pfinet/linux-src | |
parent | 2ccdc970f7d83a4a5fc3c2c6e89f94a10e36d2ac (diff) |
libpager, ext2fs: add bulk page write support
Introduce a new pager_write_pages() entry point, allowing filesystems
to implement multi-page writes in one call. libpager will attempt to
coalesce contiguous dirty pages and call this bulk interface; if it is
unsupported or only partially completes, the remaining pages are
handled by the existing per-page path.
ext2fs now provides file_pager_write_pages(), implemented using a
small chunked write loop (currently 2 blocks per chunk) under
alloc_lock. This reduces lock/unlock cycles, improves batching of
store_write() calls, and avoids starvation by yielding between chunks.
Other filesystems may continue using pager_write_page() unchanged.
Test write 128 MiB dirty file:
Before this change:
store_write calls: 32,874; avg: 4,096 B
After this change (coalesced runs, cap=128):
store_write calls: 1,300; avg 103 KiB
(~25 times fewer calls, ~25 times larger writes)
Diffstat (limited to 'pfinet/linux-src')
0 files changed, 0 insertions, 0 deletions