HomeFreeBSD

Add Linux posix_fadvise support

Description

Add Linux posix_fadvise support

The purpose of this PR is to accepts fadvise ioctl from userland
to do read-ahead by demand.

It could dramatically improve sequential read performance especially
when primarycache is set to metadata or zfs_prefetch_disable is 1.

If the file is mmaped, generic_fadvise is also called for page cache
read-ahead besides dmu_prefetch.

Only POSIX_FADV_WILLNEED and POSIX_FADV_SEQUENTIAL are supported in
this PR currently.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Finix Yan <yancw@info2soft.com>
Closes #13694

Details

Provenance
Finix1979 <yanchongwen@hotmail.com>Authored on Sep 8 2022, 5:29 PM
GitHub <noreply@github.com>Committed on Sep 8 2022, 5:29 PM
Parents
rG380b08098edf: Linux SPL module init: Handle memory allocation failures correctly
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG320f0c6022e1: Add Linux posix_fadvise support (authored by Finix1979 <yanchongwen@hotmail.com>).Sep 8 2022, 5:29 PM