aeaf748ff2
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. |
||
---|---|---|
.. | ||
Makefile | ||
uvm_amap_i.h | ||
uvm_amap.c | ||
uvm_amap.h | ||
uvm_anon.c | ||
uvm_anon.h | ||
uvm_aobj.c | ||
uvm_aobj.h | ||
uvm_bio.c | ||
uvm_ddb.h | ||
uvm_device.c | ||
uvm_device.h | ||
uvm_extern.h | ||
uvm_fault_i.h | ||
uvm_fault.c | ||
uvm_fault.h | ||
uvm_glue.c | ||
uvm_glue.h | ||
uvm_init.c | ||
uvm_io.c | ||
uvm_km.c | ||
uvm_km.h | ||
uvm_loan.c | ||
uvm_loan.h | ||
uvm_map_i.h | ||
uvm_map.c | ||
uvm_map.h | ||
uvm_meter.c | ||
uvm_mmap.c | ||
uvm_object.h | ||
uvm_page_i.h | ||
uvm_page.c | ||
uvm_page.h | ||
uvm_pager_i.h | ||
uvm_pager.c | ||
uvm_pager.h | ||
uvm_param.h | ||
uvm_pdaemon.c | ||
uvm_pdaemon.h | ||
uvm_pglist.c | ||
uvm_pglist.h | ||
uvm_pmap.h | ||
uvm_prot.h | ||
uvm_stat.c | ||
uvm_stat.h | ||
uvm_swap.c | ||
uvm_swap.h | ||
uvm_unix.c | ||
uvm_user.c | ||
uvm_vnode.c | ||
uvm.h |