aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/drm2/i915
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2015-12-16 21:30:45 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2015-12-16 21:30:45 +0000
commitb0cd20172d854584c67cd47461a77e98b43cbcd8 (patch)
treea77a93a364690da41fe0224812a20390e61cd88a /sys/dev/drm2/i915
parentbd6c93e8bd5d442c75110e038db9d0d2ad36e37f (diff)
downloadsrc-b0cd20172d854584c67cd47461a77e98b43cbcd8.tar.gz
src-b0cd20172d854584c67cd47461a77e98b43cbcd8.zip
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
Notes
Notes: svn path=/head/; revision=292373
Diffstat (limited to 'sys/dev/drm2/i915')
-rw-r--r--sys/dev/drm2/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/drm2/i915/i915_gem.c b/sys/dev/drm2/i915/i915_gem.c
index 07b516c07ed4..95edcf9acd24 100644
--- a/sys/dev/drm2/i915/i915_gem.c
+++ b/sys/dev/drm2/i915/i915_gem.c
@@ -4338,7 +4338,7 @@ i915_gem_wire_page(vm_object_t object, vm_pindex_t pindex, bool *fresh)
page = vm_page_grab(object, pindex, VM_ALLOC_NORMAL);
if (page->valid != VM_PAGE_BITS_ALL) {
if (vm_pager_has_page(object, pindex, NULL, NULL)) {
- rv = vm_pager_get_pages(object, &page, 1, 0);
+ rv = vm_pager_get_pages(object, &page, 1, NULL, NULL);
if (rv != VM_PAGER_OK) {
vm_page_lock(page);
vm_page_free(page);