Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speculative prefetch for reordered requests #16022

Merged
merged 1 commit into from
Apr 8, 2024

Commits on Mar 29, 2024

  1. Speculative prefetch for reordered requests

    Before this change speculative prefetcher was able to detect a stream
    only if all of its accesses are perfectly sequential.  It was easy to
    implement and is perfectly fine for single-threaded applications.
    Unfortunately multi-threaded network servers, such as iSCSI, SMB or
    NFS usually have plenty of threads and may often reorder requests,
    preventing successful speculation and prefetch.
    
    This change allows speculative prefetcher to detect streams even if
    requests are reordered by introducing a list of 9 non-contiguous
    ranges up to 16MB ahead of current stream position and filling the
    gaps as more requests arrive.  It also allows stream to proceed
    even with holes up to a certain configurable threshold (25%).
    
    Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
    Sponsored by:	iXsystems, Inc.
    amotin committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    610aa33 View commit details
    Browse the repository at this point in the history