From 36ca312db5272cb505e39dcd1c02bb60d1ee4cfb Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 4 Jan 2018 03:16:32 +0000 Subject: [PATCH] Once we have decided to swap out a process, don't delay the laundering of its per-thread kernel stack pages by making them pass through the inactive queue first. Instead, immediately place them in the laundry so that they might be cleaned and made available for reclamation sooner. Reviewed by: kib, markj MFC after: 1 week --- sys/vm/vm_swapout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index 62eb828cbfb..31d2bc14e29 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -546,7 +546,7 @@ vm_thread_swapout(struct thread *td) panic("vm_thread_swapout: kstack already missing?"); vm_page_dirty(m); vm_page_lock(m); - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_LAUNDRY); vm_page_unlock(m); } VM_OBJECT_WUNLOCK(ksobj);