diff options
| author | 2009-06-15 17:01:25 +0000 | |
|---|---|---|
| committer | 2009-06-15 17:01:25 +0000 | |
| commit | 3ebb6821ee15a9db4d5e1e3eb38534ef1cb2759b (patch) | |
| tree | 940f73762a3762edf9766b4fae3f4d9ded19907b /sys/uvm/uvm_pdaemon.c | |
| parent | Do not print non-vnode information if asked to report information on a (diff) | |
| download | wireguard-openbsd-3ebb6821ee15a9db4d5e1e3eb38534ef1cb2759b.tar.xz wireguard-openbsd-3ebb6821ee15a9db4d5e1e3eb38534ef1cb2759b.zip | |
Back out all the buffer cache changes I committed during c2k9. This reverts three
commits:
1) The sysctl allowing bufcachepercent to be changed at boot time.
2) The change moving the buffer cache hash chains to a red-black tree
3) The dynamic buffer cache (Which depended on the earlier too).
ok on the backout from marco and todd
Diffstat (limited to 'sys/uvm/uvm_pdaemon.c')
| -rw-r--r-- | sys/uvm/uvm_pdaemon.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 3e88675842b..b30cf1e0a98 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.47 2009/06/06 23:35:08 art Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.48 2009/06/15 17:01:26 beck Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -214,8 +214,8 @@ uvm_pageout(void *arg) for (;;) { uvm_lock_fpageq(); UVMHIST_LOG(pdhist," <<SLEEPING>>",0,0,0,0); - msleep(&uvm.pagedaemon_proc, &uvm.fpageqlock, - PVM | PNORELOCK, "pgdaemon", 0); + msleep(&uvm.pagedaemon_proc, &uvm.fpageqlock, PVM | PNORELOCK, + "pgdaemon", 0); uvmexp.pdwoke++; UVMHIST_LOG(pdhist," <<WOKE UP>>",0,0,0,0); @@ -239,13 +239,11 @@ uvm_pageout(void *arg) uvmexp.inactarg); /* - * get pages from the buffer cache, or scan if needed + * scan if needed */ - if (uvmexp.inactive < uvmexp.inactarg) + if ((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freetarg || + uvmexp.inactive < uvmexp.inactarg) { uvmpd_scan(); - else if ((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freetarg) { - if (bufbackoff() == -1) - uvmpd_scan(); } /* |
