diff options
author | alc <alc@FreeBSD.org> | 2004-06-24 04:08:43 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-06-24 04:08:43 +0000 |
commit | a96a1d58f728d0760b9df4b1a24c85c5289a039b (patch) | |
tree | e8a838a7693fe2399002e4322206669d92d9708d /sys/vm | |
parent | 821a93fb4803bc2935c393adf426de94bef16e8c (diff) | |
download | FreeBSD-src-a96a1d58f728d0760b9df4b1a24c85c5289a039b.zip FreeBSD-src-a96a1d58f728d0760b9df4b1a24c85c5289a039b.tar.gz |
Call vm_pageout_page_stats() with the page queues lock held.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_pageout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 7df4710..111c0f9 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1243,6 +1243,7 @@ vm_pageout_page_stats() static int fullintervalcount = 0; int page_shortage; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); page_shortage = (cnt.v_inactive_target + cnt.v_cache_max + cnt.v_free_min) - (cnt.v_free_count + cnt.v_inactive_count + cnt.v_cache_count); @@ -1250,7 +1251,6 @@ vm_pageout_page_stats() if (page_shortage <= 0) return; - vm_page_lock_queues(); pcount = cnt.v_active_count; fullintervalcount += vm_pageout_stats_interval; if (fullintervalcount < vm_pageout_full_stats_interval) { @@ -1313,7 +1313,6 @@ vm_pageout_page_stats() m = next; } - vm_page_unlock_queues(); } /* @@ -1437,9 +1436,9 @@ vm_pageout() error = msleep(&vm_pages_needed, &vm_page_queue_mtx, PVM, "psleep", vm_pageout_stats_interval * hz); if (error && !vm_pages_needed) { - vm_page_unlock_queues(); pass = 0; vm_pageout_page_stats(); + vm_page_unlock_queues(); continue; } } |