Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Bob Beck (beckcvs.openbsd.org)
Date: Thu Jun 04 2009 - 23:29:14 CDT
Module name: src
Changes by: beckcvs.openbsd.org 2009/06/04 22:29:14
sys/kern : kern_sysctl.c vfs_bio.c
sys/sys : mount.h
sys/uvm : uvm_pdaemon.c
Dynamic buffer cache sizing.
This commit won't change the default behaviour of the system unless the
buffer cache size is increased with sysctl kern.bufcachepercent. By default
our buffer cache is 10% of memory, which with this commit is now treated
as a low water mark. If the buffer cache size is increased, the new size
is treated as a high water mark and the buffer cache is permitted to grow
to that percentage of memory.
If the page daemon is invoked, the page daemon will ask the buffer cache
to relenquish pages. if the buffer cache has more than the low water mark it
will relenquish pages allowing them to be consumed by uvm. after a short
period the buffer cache will attempt to re-grow back to the high water mark.
This permits the use of a large buffer cache without penalizing the available
memory for other purposes.
Above the low water mark the buffer cache remains entirely subservient to
the page daemon, so if uvm requires pages, the buffer cache will abandon
ok art thib oga