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.
Linux has a readahead logic designed to accelerate sequential workloads.
ZFS has its own readahead logic called zprefetch that operates on both
zvols and datasets. Having two prefetchers active at the same time
causes overprefetching, which unnecessarily reduces IOPS performance on
CoW filesystems like ZFS.
We currently disable the Linux readahead logic on datasets in the belief
that zprefetch is superior because it is aware of the internal geometry
used in ZFS while the Linux readahead logic is not. In particular,
zprefetch aligns readahead to ZFS' internal geometry and is integrated
with ARC to ensure that prefetches are not considered hits. This makes
zprefetch more desireable than the Linux readahead logic on both
datasets and zvols.
This patch disables Linux's readahead logic on zvols to be consistent
with datasets. This has the side benefit of making the behavior of ZFS
more consistent across platforms.
Signed-off-by: Richard Yao ryao@gentoo.org