A comparison of the new nfsd iomodes (and an experimental one)#925
Closed
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
Closed
A comparison of the new nfsd iomodes (and an experimental one)#925vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
Conversation
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>
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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