NetBSD/sys/uvm
tls aeaf748ff2 Buffer cache fixes to avoid thrashing between high and low water marks
and uncontrolled growth.

The key fix is from Dan Carasone, who noticed that buf_canfree() was
counting in _bytes_ but freeing in _buffers_, which caused the instant
drop to lowater observed by some users.

We now control the rate of growth; the probability of getting a new
allocation is inversely proportional to the current size of the
cache.  This idea is from a long-ago conversation with Kirk McKusick
and, if memory serves, was used for the file-system cache in some
other BSD variant at some point in history.

With growth and shrinkage more or less dealt with, we return the
default maximum cache size to 15%.  The default _minimum_ cache size
is raised from 1/16 of the maximum cache size to 1/8, since 1/16 was
chosen when the maximum size was 30% of memory.

Finally, after observing the behaviour of the pagedaemon and the
buffer cache drainer under pathological workloads (e.g. a benchmark
that steps through 75% of available memory backwards) I have moved
the call to buf_drain() to the beginning of the pagedaemon from the
end; if the pagedaemon bogs down, it still won't get run as often
as it should, but at least this way it will see the state of the
free count and free target _before_ the scan step does its thing.
2004-01-30 11:32:16 +00:00
..
Makefile
uvm_amap_i.h
uvm_amap.c
uvm_amap.h
uvm_anon.c fix lock initialization in uvm_anon_add(). from PR 23831. 2004-01-06 15:56:49 +00:00
uvm_anon.h
uvm_aobj.c
uvm_aobj.h
uvm_bio.c #if 0 out unused ubc_flush(). 2004-01-07 12:18:16 +00:00
uvm_ddb.h replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
uvm_device.c
uvm_device.h
uvm_extern.h Rearrange process exit path to avoid need to free resources from different 2004-01-04 11:33:29 +00:00
uvm_fault_i.h
uvm_fault.c
uvm_fault.h
uvm_glue.c uvm_coredump_walkmap: use UVM_OBJ_IS_DEVICE macro. 2004-01-16 12:43:16 +00:00
uvm_glue.h
uvm_init.c
uvm_io.c
uvm_km.c - split uvm_map() into two functions for the followings. 2004-01-29 12:06:02 +00:00
uvm_km.h
uvm_loan.c - get pages to loan out in uvm_loanuobjpages() rather than 2004-01-07 12:17:10 +00:00
uvm_loan.h - get pages to loan out in uvm_loanuobjpages() rather than 2004-01-07 12:17:10 +00:00
uvm_map_i.h - split uvm_map() into two functions for the followings. 2004-01-29 12:06:02 +00:00
uvm_map.c some English fixes from Soren Jacobsen. 2004-01-29 12:07:29 +00:00
uvm_map.h - split uvm_map() into two functions for the followings. 2004-01-29 12:06:02 +00:00
uvm_meter.c sysctl_vm_updateminmax: fix swapped filemin and execmin. 2004-01-11 18:42:25 +00:00
uvm_mmap.c
uvm_object.h
uvm_page_i.h
uvm_page.c bump vnode hold count for page cache as well 2004-01-14 11:28:04 +00:00
uvm_page.h
uvm_pager_i.h
uvm_pager.c
uvm_pager.h
uvm_param.h
uvm_pdaemon.c Buffer cache fixes to avoid thrashing between high and low water marks 2004-01-30 11:32:16 +00:00
uvm_pdaemon.h
uvm_pglist.c
uvm_pglist.h
uvm_pmap.h
uvm_prot.h
uvm_stat.c
uvm_stat.h rearrange struct uvm_history to put the struct simplelock at the end. 2004-01-24 21:29:03 +00:00
uvm_swap.c Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:06:48 +00:00
uvm_swap.h
uvm_unix.c
uvm_user.c
uvm_vnode.c
uvm.h - split uvm_map() into two functions for the followings. 2004-01-29 12:06:02 +00:00