Skip to content

Bridge speculative and prescient prefetchers#18351

Open
amotin wants to merge 1 commit intoopenzfs:masterfrom
amotin:zfetch_stream
Open

Bridge speculative and prescient prefetchers#18351
amotin wants to merge 1 commit intoopenzfs:masterfrom
amotin:zfetch_stream

Conversation

@amotin
Copy link
Member

@amotin amotin commented Mar 19, 2026

There are cases when we need to read large objects sequentially. Prescient prefetcher may be limited by size, trying to prefetch it all at once. Speculative prefetcher can do it nicer for ARC, but needs a ramp-up period at the beginning.

To cover this gap, introduce dmu_prefetch_stream(), priming the speculative prefetcher to either go full speed on first demand request, or even start some prefetch immediately, but continue following the demand later.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

There are cases when we need to read large objects sequentially.
Prescient prefetcher may be limited by size, trying to prefetch
it all at once.  Speculative prefetcher can do it nicer for ARC,
but needs a ramp-up period at the beginning.

To cover this gap, introduce dmu_prefetch_stream(), priming the
speculative prefetcher to either go full speed on first demand
request, or even start some prefetch immediately, but continue
following the demand later.

Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
@amotin amotin added the Status: Code Review Needed Ready for review and testing label Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Code Review Needed Ready for review and testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant