summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-12-16 21:30:45 +0000
committerglebius <glebius@FreeBSD.org>2015-12-16 21:30:45 +0000
commit63cd1c131acbe2c4896430de52395b168ee9b73d (patch)
treea77a93a364690da41fe0224812a20390e61cd88a /share/man
parent70b396ca9c54a94c3fad73c3ceb0a76dffbde635 (diff)
downloadFreeBSD-src-63cd1c131acbe2c4896430de52395b168ee9b73d.zip
FreeBSD-src-63cd1c131acbe2c4896430de52395b168ee9b73d.tar.gz
A change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES().
o With new KPI consumers can request contiguous ranges of pages, and unlike before, all pages will be kept busied on return, like it was done before with the 'reqpage' only. Now the reqpage goes away. With new interface it is easier to implement code protected from race conditions. Such arrayed requests for now should be preceeded by a call to vm_pager_haspage() to make sure that request is possible. This could be improved later, making vm_pager_haspage() obsolete. Strenghtening the promises on the business of the array of pages allows us to remove such hacks as swp_pager_free_nrpage() and vm_pager_free_nonreq(). o New KPI accepts two integer pointers that may optionally point at values for read ahead and read behind, that a pager may do, if it can. These pages are completely owned by pager, and not controlled by the caller. This shifts the UFS-specific readahead logic from vm_fault.c, which should be file system agnostic, into vnode_pager.c. It also removes one VOP_BMAP() request per hard fault. Discussed with: kib, alc, jeff, scottl Sponsored by: Nginx, Inc. Sponsored by: Netflix
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/VOP_GETPAGES.919
1 files changed, 13 insertions, 6 deletions
diff --git a/share/man/man9/VOP_GETPAGES.9 b/share/man/man9/VOP_GETPAGES.9
index 2cc5b7a..4625d9b 100644
--- a/share/man/man9/VOP_GETPAGES.9
+++ b/share/man/man9/VOP_GETPAGES.9
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 12, 2014
+.Dd December 16, 2015
.Dt VOP_GETPAGES 9
.Os
.Sh NAME
@@ -41,7 +41,7 @@
.In sys/vnode.h
.In vm/vm.h
.Ft int
-.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int reqpage"
+.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int *rbehind" "int *rahead"
.Ft int
.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals"
.Sh DESCRIPTION
@@ -63,7 +63,7 @@ locks are held.
Both methods return in the same state on both success and error returns.
.Pp
The arguments are:
-.Bl -tag -width reqpage
+.Bl -tag -width rbehind
.It Fa vp
The file to access.
.It Fa ma
@@ -78,9 +78,16 @@ if the write should be synchronous.
An array of VM system result codes indicating the status of each
page written by
.Fn VOP_PUTPAGES .
-.It Fa reqpage
-The index in the page array of the requested page; i.e., the one page which
-the implementation of this method must handle.
+.It Fa rbehind
+Optional pointer to integer specifying number of pages to be read behind, if
+possible.
+If the filesystem supports that feature, number of actually read pages is
+reported back, otherwise zero is returned.
+.It Fa rahead
+Optional pointer to integer specifying number of pages to be read ahead, if
+possible.
+If the filesystem supports that feature, number of actually read pages is
+reported back, otherwise zero is returned.
.El
.Pp
The status of the
OpenPOWER on IntegriCloud