From 48c0444c986a93be90284cf41a8f4380ef5a4c0a Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 20 Jul 2002 18:45:25 +0000 Subject: [PATCH] o Lock accesses to the active page queue in vm_pageout_scan() and vm_pageout_page_stats(). --- sys/vm/vm_pageout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 2e5bd079d7d8..7dce8e890ae8 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -961,6 +961,7 @@ vm_pageout_scan(int pass) cnt.v_inactive_target - cnt.v_inactive_count; page_shortage += addl_page_shortage; + vm_page_lock_queues(); /* * Scan the active queue for things we can deactivate. We nominally * track the per-page activity counter and use it to locate @@ -1045,7 +1046,7 @@ vm_pageout_scan(int pass) } m = next; } - + vm_page_unlock_queues(); s = splvm(); /* @@ -1216,7 +1217,7 @@ vm_pageout_page_stats() return; s0 = splvm(); - + vm_page_lock_queues(); pcount = cnt.v_active_count; fullintervalcount += vm_pageout_stats_interval; if (fullintervalcount < vm_pageout_full_stats_interval) { @@ -1280,6 +1281,7 @@ vm_pageout_page_stats() m = next; } + vm_page_unlock_queues(); splx(s0); }