summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs_subr.c
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 /sys/fs/tmpfs/tmpfs_subr.c
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 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index fa489b2..fcc8782 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -1370,7 +1370,8 @@ retry:
VM_OBJECT_WLOCK(uobj);
goto retry;
} else if (m->valid != VM_PAGE_BITS_ALL)
- rv = vm_pager_get_pages(uobj, &m, 1, 0);
+ rv = vm_pager_get_pages(uobj, &m, 1,
+ NULL, NULL);
else
/* A cached page was reactivated. */
rv = VM_PAGER_OK;
OpenPOWER on IntegriCloud