NetBSD/sys/kern
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
..
Make.tags.inc
Makefile We have CVS; there is no reason to make .bak files when generating the 2003-11-15 20:26:02 +00:00
cnmagic.c
core_elf32.c
core_elf64.c
core_netbsd.c
exec_aout.c
exec_conf.c
exec_ecoff.c
exec_elf32.c Back out >2 PT_LOAD changes from rev 1.96. They cause older GCC3-compiled 2004-01-07 16:42:53 +00:00
exec_elf64.c
exec_macho.c
exec_script.c
exec_subr.c
genassym.awk
genassym.sh
genlintstub.awk
init_main.c Bump default size of vnode cache to 1% of physical memory, instead of 2004-01-09 00:04:53 +00:00
init_sysctl.c Avoid dereferencing l...it might be NULL 2004-01-17 03:33:24 +00:00
init_sysent.c uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in 2004-01-29 02:00:02 +00:00
kern_acct.c
kern_clock.c Fix NTP PPSAPI support (enabled with "options PPS_SYNC"): 2004-01-23 05:01:19 +00:00
kern_descrip.c fix F_MAXFD fcntl - it returned the value as errno instead 2004-01-07 09:26:29 +00:00
kern_event.c fix assertion - non-alive processes are in SZOMB state now 2004-01-11 18:51:15 +00:00
kern_exec.c Put back Emmanuel's sigfilter hooks, as decided by Core. 2003-12-20 19:01:29 +00:00
kern_exit.c Rearrange process exit path to avoid need to free resources from different 2004-01-04 11:33:29 +00:00
kern_fork.c - Count number of zombies and stopped children and requeue them at the top 2003-11-12 21:07:37 +00:00
kern_ksyms.c If ksyms have not been initialized, return ENXIO in ksymsopen instead of 2004-01-08 22:48:26 +00:00
kern_kthread.c
kern_ktrace.c clean up a little: 2004-01-16 05:03:02 +00:00
kern_lkm.c o Fix a bug in ksyms that changed the real meaning of st_name entries for 2003-11-17 10:16:18 +00:00
kern_lock.c Fix last commit. The current spl was an implicit argument to the ACQUIRE 2003-12-08 14:21:25 +00:00
kern_lwp.c g/c process state SDEAD - it's not used anymore after 'reaper' removal 2004-01-11 19:39:48 +00:00
kern_malloc.c
kern_malloc_debug.c
kern_microtime.c
kern_ntptime.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
kern_physio.c store a i/o priority hint in struct buf for buffer queue discipline. 2004-01-10 14:39:50 +00:00
kern_proc.c Rearrange process exit path to avoid need to free resources from different 2004-01-04 11:33:29 +00:00
kern_prot.c
kern_ras.c Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead. 2003-11-04 10:33:15 +00:00
kern_resource.c Don't need those any more 2003-12-06 04:25:57 +00:00
kern_sa.c kernel part of no-syscall upcall stack return: libpthread registers 2004-01-02 18:52:17 +00:00
kern_sig.c Move the sigfilter hook to a more adequate location, and rename it to better 2003-12-24 22:53:59 +00:00
kern_subr.c Don't pass the (unused) return value args to the 2003-10-31 03:28:12 +00:00
kern_synch.c ; may be a comment character in assembly, use \n as a separator instead. 2004-01-04 13:27:53 +00:00
kern_sysctl.c In sysctl_locate(), use "rnode" like everywhere else, don't call it 2004-01-17 04:01:14 +00:00
kern_systrace.c clean up a little: 2004-01-16 05:03:02 +00:00
kern_time.c kernel part of no-syscall upcall stack return: libpthread registers 2004-01-02 18:52:17 +00:00
kern_timeout.c Make callout_setfunc() a CPP macro. Suggested by enami. 2003-10-30 04:32:56 +00:00
kern_uuid.c uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in 2004-01-29 02:00:02 +00:00
kern_verifiedexec.c Remove spurious space accidently introduced in last. 2003-11-18 13:13:03 +00:00
kern_xxx.c
kgdb_stub.c
makesyscalls.sh
subr_autoconf.c www.netbsd.org -> www.NetBSD.org 2003-11-17 10:07:58 +00:00
subr_devsw.c
subr_disk.c add a new bufq strategy, BUFQ_PRIOCSCAN (per-priority CSCAN). 2004-01-10 14:49:44 +00:00
subr_disk_mbr.c
subr_extent.c
subr_log.c
subr_pool.c - fix locking order problem. (pa_slock -> pr_slock) 2004-01-16 12:47:37 +00:00
subr_prf.c
subr_prof.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
subr_prop.c Remove trailing blank line. 2003-12-21 11:54:16 +00:00
subr_userconf.c
subr_xxx.c
sys_generic.c
sys_pipe.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
sys_pmc.c
sys_process.c Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead. 2003-11-04 10:33:15 +00:00
sys_socket.c
syscalls.c uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in 2004-01-29 02:00:02 +00:00
syscalls.conf
syscalls.master uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in 2004-01-29 02:00:02 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c fix semaphore ID bound checking 2003-11-29 11:43:25 +00:00
sysv_shm.c Wrap long line. 2003-12-06 01:53:14 +00:00
tty.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
tty_conf.c
tty_pty.c
tty_subr.c Modify the licences of code written by Theo De Raadt from a 4-clause 2003-12-10 12:06:25 +00:00
tty_tb.c
tty_tty.c
uipc_domain.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
uipc_mbuf.c Fix the kern.mbuf tunables. 2004-01-21 02:11:20 +00:00
uipc_mbuf2.c Add m_tag_delete_nonpesrsistent(), for deleting all packet tags on 2003-11-13 01:48:12 +00:00
uipc_proto.c
uipc_sem.c
uipc_socket.c
uipc_socket2.c
uipc_syscalls.c Restore a change that made AF_LOCAL sockets block on connect(2) until 2003-11-29 10:02:42 +00:00
uipc_usrreq.c Avoid using m_clget() on a mbuf already in use, especially when we 2003-12-29 22:08:02 +00:00
vfs_bio.c Buffer cache fixes to avoid thrashing between high and low water marks 2004-01-30 11:32:16 +00:00
vfs_cache.c
vfs_getcwd.c
vfs_init.c
vfs_lockf.c
vfs_lookup.c Fix the last commit(s). On machines with sizeof(long) != sizeof(int) 2003-12-08 14:23:33 +00:00
vfs_subr.c bump vnode hold count for page cache as well 2004-01-14 11:28:04 +00:00
vfs_syscalls.c The file system snapshot pseudo driver. 2003-12-10 11:40:11 +00:00
vfs_vnops.c Allow vfs_write_suspend() to wait if the file system is already 2004-01-10 17:16:38 +00:00
vnode_if.c Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:06:48 +00:00
vnode_if.sh Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:02:04 +00:00
vnode_if.src Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:02:04 +00:00