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
This commit is contained in:
Finix1979
2022-09-09 01:29:41 +08:00
committed by GitHub
parent 380b08098e
commit 320f0c6022
15 changed files with 365 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@
/devname2devid
/dir_rd_update
/draid
/file_fadvise
/file_append
/file_check
/file_trunc