diff options
| author | 2009-08-02 16:28:39 +0000 | |
|---|---|---|
| committer | 2009-08-02 16:28:39 +0000 | |
| commit | 89502cd6536ab6296cb0ccd049742273d8af195c (patch) | |
| tree | 0f5063329c85893f79d6d7b4d68c7fb299c98486 /sys/uvm/uvm_pdaemon.c | |
| parent | "ldpctl show lib" output cleanup. (diff) | |
| download | wireguard-openbsd-89502cd6536ab6296cb0ccd049742273d8af195c.tar.xz wireguard-openbsd-89502cd6536ab6296cb0ccd049742273d8af195c.zip | |
Dynamic buffer cache support - a re-commit of what was backed out
after c2k9
allows buffer cache to be extended and grow/shrink dynamically
tested by many, ok oga@, "why not just commit it" deraadt@
Diffstat (limited to 'sys/uvm/uvm_pdaemon.c')
| -rw-r--r-- | sys/uvm/uvm_pdaemon.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 046368e697a..000ef14d0a2 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.52 2009/07/22 21:05:37 oga Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.53 2009/08/02 16:28:40 beck Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -239,11 +239,13 @@ uvm_pageout(void *arg) uvmexp.inactarg); /* - * scan if needed + * get pages from the buffer cache, or scan if needed */ - if ((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freetarg || - uvmexp.inactive < uvmexp.inactarg) { + if (uvmexp.inactive < uvmexp.inactarg) uvmpd_scan(); + else if ((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freetarg) { + if (bufbackoff() == -1) + uvmpd_scan(); } /* |
