diff options
| author | 2001-11-06 13:36:52 +0000 | |
|---|---|---|
| committer | 2001-11-06 13:36:52 +0000 | |
| commit | 9956d4a25eb366a54aabff59408c906841a66eca (patch) | |
| tree | 7fdeb3057159a7c5a1a4d15c06d65a2cd9938a4f /sys/uvm/uvm_pdaemon.c | |
| parent | Use #defines for skip step values. From dgregor@net.ohio-state.edu. (diff) | |
| download | wireguard-openbsd-9956d4a25eb366a54aabff59408c906841a66eca.tar.xz wireguard-openbsd-9956d4a25eb366a54aabff59408c906841a66eca.zip | |
More sync to NetBSD.
- Use malloc/free instead of MALLOC/FREE for variable sized allocations.
- Move the memory inheritance code to sys/mman.h and rename from VM_* to MAP_*
- various cleanups and simplifications.
Diffstat (limited to 'sys/uvm/uvm_pdaemon.c')
| -rw-r--r-- | sys/uvm/uvm_pdaemon.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 612d8b8d04d..42f141b17c0 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.15 2001/11/06 01:35:04 art Exp $ */ -/* $NetBSD: uvm_pdaemon.c,v 1.21 2000/06/27 17:29:33 mrg Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.16 2001/11/06 13:36:52 art Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -170,6 +170,10 @@ uvmpd_tune() uvmexp.freemin = max(uvmexp.freemin, (16*1024) >> PAGE_SHIFT); uvmexp.freemin = min(uvmexp.freemin, (512*1024) >> PAGE_SHIFT); + /* Make sure there's always a user page free. */ + if (uvmexp.freemin < uvmexp.reserve_kernel + 1) + uvmexp.freemin = uvmexp.reserve_kernel + 1; + uvmexp.freetarg = (uvmexp.freemin * 4) / 3; if (uvmexp.freetarg <= uvmexp.freemin) uvmexp.freetarg = uvmexp.freemin + 1; @@ -186,7 +190,7 @@ uvmpd_tune() */ void -uvm_pageout() +uvm_pageout(void *arg) { int npages = 0; int s; |
