diff options
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm_page.c | 22 | ||||
-rw-r--r-- | vm/vm_pageout.c | 13 |
2 files changed, 10 insertions, 25 deletions
diff --git a/vm/vm_page.c b/vm/vm_page.c index a7dab114..9a7fa275 100644 --- a/vm/vm_page.c +++ b/vm/vm_page.c @@ -313,7 +313,6 @@ vm_page_can_move(const struct vm_page *page) */ return !page->busy - && !page->external_laundry && !page->wanted && !page->absent && page->object->alive; @@ -1157,26 +1156,19 @@ restart: * fault could occur, during which the map would be locked. * This fault would cause a new paging request to the default * pager. Receiving that request would deadlock when trying to - * lock the map again. Instead, the page isn't double paged. - * The external_laundry bit is set to indicate this situation - * to vm_pageout_setup. + * lock the map again. Instead, the page isn't double paged + * and vm_pageout_setup wires the page down, trusting the + * default pager as for internal pages. */ - assert(!page->laundry && !page->external_laundry); + assert(!page->laundry); assert(!(double_paging && page->external)); - if (object->internal) { + if (object->internal || !alloc_paused || + memory_manager_default_port(object->pager)) { double_paging = FALSE; } else { - if (memory_manager_default_port(object->pager)) { - double_paging = FALSE; - page->external_laundry = TRUE; - } else if (!alloc_paused) { - double_paging = FALSE; - } else { - double_paging = TRUE; - page->laundry = TRUE; - } + double_paging = page->laundry = TRUE; } out: diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c index 62a27f1a..575a9f5d 100644 --- a/vm/vm_pageout.c +++ b/vm/vm_pageout.c @@ -47,6 +47,7 @@ #include <kern/task.h> #include <kern/thread.h> #include <kern/printf.h> +#include <vm/memory_object.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> @@ -253,21 +254,13 @@ vm_pageout_setup( assert(!old_object->internal); m->laundry = FALSE; - } else if (old_object->internal) { + } else if (old_object->internal || + memory_manager_default_port(old_object->pager)) { m->laundry = TRUE; vm_page_laundry_count++; 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; /* |