aboutsummaryrefslogtreecommitdiff
path: root/vm/vm_pageout.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-12-23 04:08:53 +0100
committerRichard Braun <rbraun@sceen.net>2016-12-24 00:08:45 +0100
commiteb07428ffb0009085fcd01dd1b79d9953af8e0ad (patch)
tree2540c74e940fc38ea17ef8c825a96d5ef58f1b2c /vm/vm_pageout.c
parent1b8e67a0ff194c5d67fe22a918c2449c2d9ac150 (diff)
downloadgnumach-eb07428ffb0009085fcd01dd1b79d9953af8e0ad.tar.gz
gnumach-eb07428ffb0009085fcd01dd1b79d9953af8e0ad.tar.bz2
gnumach-eb07428ffb0009085fcd01dd1b79d9953af8e0ad.zip
VM: fix pageout of external objects backed by the default pager
Double paging on such objects causes deadlocks. * vm/vm_page.c: Include <vm/memory_object.h>. (vm_page_seg_evict): Rename laundry to double_paging to increase clarity. Set the `external_laundry' bit when evicting a page from an external object backed by the default pager. * vm/vm_pageout.c (vm_pageout_setup): Wire page if the `external_laundry' bit is set.
Diffstat (limited to 'vm/vm_pageout.c')
-rw-r--r--vm/vm_pageout.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
index da0f8077..62a27f1a 100644
--- a/vm/vm_pageout.c
+++ b/vm/vm_pageout.c
@@ -259,6 +259,15 @@ vm_pageout_setup(
vm_page_wire(m);
} else {
+ /*
+ * The caller is telling us that this page belongs
+ * to an external object managed by the default pager.
+ * Wire it to avoid a deadlock on the default pager map.
+ */
+ if (m->external_laundry) {
+ vm_page_wire(m);
+ }
+
m->external_laundry = TRUE;
/*