]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
VMIO read
authorkib <kib@FreeBSD.org>
Sun, 16 Aug 2020 21:02:45 +0000 (21:02 +0000)
committerkib <kib@FreeBSD.org>
Sun, 16 Aug 2020 21:02:45 +0000 (21:02 +0000)
commitabab61b15439a1bf20eeb30a52d5810f29f65b5f
treee3ef97c76f97aa02509828b92b74d76c67945e68
parent435ffde3e1851e68f0c8272bb07e72a1d201a6fd
VMIO read

If possible, i.e. if the requested range is resident valid in the vm
object queue, and some secondary conditions hold, copy data for
read(2) directly from the valid cached pages, avoiding vnode lock and
instantiating buffers.  I intentionally do not start read-ahead, nor
handle the advises on the cached range.

Filesystems indicate support for VMIO reads by setting VIRF_PGREAD
flag, which must not be cleared until vnode reclamation.

Currently only filesystems that use vnode pager for v_objects can
enable it, due to reliance on vnp_size.  There is a WIP to handle it
for tmpfs.

Reviewed by: markj
Discussed with: jeff
Tested by: pho
Benchmarked by: mjg
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968
sys/kern/vfs_subr.c
sys/kern/vfs_vnops.c
sys/sys/vnode.h