summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-01-14 06:57:03 +0000
committeralc <alc@FreeBSD.org>2003-01-14 06:57:03 +0000
commitc7ca47fcc7cd393f626b58b6b5e5c6d1c05494d9 (patch)
tree24db1344150e130dd55fba25b85388b5264f1cb1 /sys/vm/vm_page.c
parent8f97c15f80b1b5c708048e55765ff56df527eb82 (diff)
downloadFreeBSD-src-c7ca47fcc7cd393f626b58b6b5e5c6d1c05494d9.zip
FreeBSD-src-c7ca47fcc7cd393f626b58b6b5e5c6d1c05494d9.tar.gz
- Update vm_pageout_deficit using atomic operations. It's a simple
counter outside the scope of existing locks. - Eliminate a redundant clearing of vm_pageout_deficit.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 56abce4..bbdc77b 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -805,7 +805,7 @@ loop:
if (cnt.v_cache_count > 0)
printf("vm_page_alloc(NORMAL): missing pages on cache queue: %d\n", cnt.v_cache_count);
#endif
- vm_pageout_deficit++;
+ atomic_add_int(&vm_pageout_deficit, 1);
pagedaemon_wakeup();
return (NULL);
}
@@ -821,7 +821,7 @@ loop:
*/
mtx_unlock_spin(&vm_page_queue_free_mtx);
splx(s);
- vm_pageout_deficit++;
+ atomic_add_int(&vm_pageout_deficit, 1);
pagedaemon_wakeup();
return (NULL);
}
OpenPOWER on IntegriCloud