Skip to content

A comparison of the new nfsd iomodes (and an experimental one)#925

Closed
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
pw/1073037/vfs.base.ci
Closed

A comparison of the new nfsd iomodes (and an experimental one)#925
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
pw/1073037/vfs.base.ci

Conversation

@vfsci-bot
Copy link
Copy Markdown

@vfsci-bot vfsci-bot Bot commented Mar 26, 2026

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1073037
Submitter: Jeff Layton
Version: 1
Patches: 1/1
Message-ID: <4ebbd194ccfb3bcea6225d926b4c9f339e21c813.camel@kernel.org>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/4ebbd194ccfb3bcea6225d926b4c9f339e21c813.camel@kernel.org


Automated by ml2pr

IOCB_DONTCACHE flushes all dirty pages on every write via
filemap_flush_range() with nr_to_write=LONG_MAX.  Under concurrent
writers, this creates severe serialization: every writer contends on
the writeback submission path, leading to catastrophic throughput
collapse (~1 GB/s vs ~10 GB/s for buffered) and multi-second tail
latency.

Add IOCB_DONTCACHE_LAZY as a gentler alternative with two mechanisms:

 1. Skip-if-busy: check mapping_tagged(PAGECACHE_TAG_WRITEBACK) before
    flushing.  If writeback is already in progress on the mapping, the
    flush is skipped entirely, eliminating writeback submission
    contention between concurrent writers.

 2. Proportional cap: when flushing does occur, cap nr_to_write to the
    number of pages just written.  This prevents any single write from
    triggering a full-file flush that would starve concurrent readers.

Together these mechanisms rate-limit writeback to match the incoming
write rate while avoiding I/O bursts that cause tail latency spikes.

Like IOCB_DONTCACHE, pages touched under IOCB_DONTCACHE_LAZY are
marked for eviction (dropbehind) to keep page cache usage bounded.

Also add RWF_DONTCACHE_LAZY (0x200) as a user-visible pwritev2/io_uring
flag that maps to IOCB_DONTCACHE_LAZY.  The flag follows the same
validation as RWF_DONTCACHE: the filesystem must support FOP_DONTCACHE,
DAX is not supported, and RWF_DONTCACHE and RWF_DONTCACHE_LAZY are
mutually exclusive.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
@vfsci-bot
Copy link
Copy Markdown
Author

vfsci-bot Bot commented Apr 9, 2026

This PR is older than 14 days. Closing automatically. If the series is still relevant, a new version will create a new PR.


Automated by ml2pr

@vfsci-bot vfsci-bot Bot closed this Apr 9, 2026
@vfsci-bot vfsci-bot Bot deleted the pw/1073037/vfs.base.ci branch April 9, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant