aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2020-01-19 23:47:32 +0000
committerJeff Roberson <jeff@FreeBSD.org>2020-01-19 23:47:32 +0000
commitd6e13f3b4d5743177ac22f3642b07ba652c1f1a8 (patch)
tree000c91864ae5607a0215d20571ecf7ab0ea66812 /sys/vm/vm_page.c
parentd1df7fdd040a25a6d61d04a3e04a931aa75f3094 (diff)
downloadsrc-d6e13f3b4d5743177ac22f3642b07ba652c1f1a8.tar.gz
src-d6e13f3b4d5743177ac22f3642b07ba652c1f1a8.zip
Don't hold the object lock while calling getpages.
The vnode pager does not want the object lock held. Moving this out allows further object lock scope reduction in callers. While here add some missing paging in progress calls and an assert. The object handle is now protected explicitly with pip. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23033
Notes
Notes: svn path=/head/; revision=356902
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 51d1f0059a0d..dc137e82aaf2 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -4398,7 +4398,11 @@ retrylookup:
}
}
after = i;
+ vm_object_pip_add(object, after);
+ VM_OBJECT_WUNLOCK(object);
rv = vm_pager_get_pages(object, ma, after, NULL, NULL);
+ VM_OBJECT_WLOCK(object);
+ vm_object_pip_wakeupn(object, after);
/* Pager may have replaced a page. */
m = ma[0];
if (rv != VM_PAGER_OK) {