NetBSD/sys/kern
tls 28364b01be Add pool_reclaim() on pool to which we just pool_put() a buffer in
buf_mrelease().  Without this, though the pages are returned to the
relevant *pool*, they are never available for any other use in the
system.

Now the backpressure on the physical size of the buffer cache through
the buf_drain() call in the pagedaemon works correctly.  If anything,
it may be a bit more aggressive than intended.  On my 256MB system,
with vm.bufcache set to the default 30% of physmem, a kernel with this
fix can do 5 simultaneous config/makedep/builds of different NetBSD
kernels in 1313 seconds; with the "traditional" buffer cache code it
requires 1320 seconds.  Running "find / -type d -exec ls -l {}" while
the build is going demonstrates that the backpressure is working
correctly: free memory oscillates slowly between close to none and
the UVM target free, and vmstat -m shows a large number of releases
for the buffer pools.

For future work: how is "bufpl" memory returned to the system?  This
is not obvious to me (I must be looking in the wrong place).  Also,
buf_mrelease() is also called from brelse() in some cases.  Would it
be better to add a pool flag causing automatic release of full pages
as they become available (not fragmented)?  Jason Thorpe proposed this
and it seems more elegant than cleaning the _entire_ pool only upon
memory pressure.

Greg Oster did a lot of the work of figuring this out.  Jason proposed
the use of pool_reclaim as a way to fix it.
2004-01-08 23:41:14 +00:00
..
cnmagic.c TNF & remove trailing spaces. 2003-08-22 02:01:32 +00:00
core_elf32.c handle siginfo for deferred signals. Allocate a ksiginfo pool, and store 2003-09-14 06:59:13 +00:00
core_elf64.c
core_netbsd.c handle siginfo for deferred signals. Allocate a ksiginfo pool, and store 2003-09-14 06:59:13 +00:00
exec_aout.c GC: exec_foo_setup_stack; use exec_setup_stack, and provide a way for 2003-08-08 18:53:13 +00:00
exec_conf.c Support Darwin static binaries (I should say: support the only Darwin 2003-10-19 07:52:22 +00:00
exec_ecoff.c GC: exec_foo_setup_stack; use exec_setup_stack, and provide a way for 2003-08-08 18:53:13 +00:00
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 One more section type in the Mach-O format. Now /usr/X11R6/bin/quartz-wm links 2003-10-20 22:42:40 +00:00
exec_script.c Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
exec_subr.c Expand NEW_VMCMD() macro to a real function new_vmcmd() for the 2003-08-29 01:44:02 +00:00
genassym.awk
genassym.sh
genlintstub.awk This program is called genlintstub.awk 2003-05-20 20:25:31 +00:00
init_main.c Store the copyright text in conf/copyright, and use conf/newvers.sh 2004-01-05 03:33:06 +00:00
init_sysctl.c Sysctl functions called for "generic" nodes should forward "query" 2003-12-28 22:36:37 +00:00
init_sysent.c regen 2004-01-02 18:53:45 +00:00
kern_acct.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
kern_clock.c Dynamic sysctl. 2003-12-04 19:38:21 +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 Unlock kq_lock in the case of a timeout. 2003-07-18 17:34:07 +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 Defer writing of KTR_EMUL entry until first trace done by target process. 2003-12-14 22:56:45 +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 Rearrange process exit path to avoid need to free resources from different 2004-01-04 11:33:29 +00:00
kern_malloc_debug.c don't use NULL as vaddr_t. 2003-10-24 00:53:43 +00:00
kern_malloc.c Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
kern_microtime.c Remove an unnecessary local variable (and save a read of the "time" 2003-06-28 15:02:24 +00:00
kern_ntptime.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
kern_physio.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +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 Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
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 Avoid dereferencing l in sysctl_lookup(), because it can be NULL. 2003-12-29 04:19:28 +00:00
kern_systrace.c Fix two typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 09:49:20 +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_verifiedexec.c Remove spurious space accidently introduced in last. 2003-11-18 13:13:03 +00:00
kern_xxx.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
kgdb_stub.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +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
makesyscalls.sh Keep track of which prototypes we declared already so that we don't 2003-09-30 20:34:28 +00:00
subr_autoconf.c www.netbsd.org -> www.NetBSD.org 2003-11-17 10:07:58 +00:00
subr_devsw.c add missing __KERNEL_RCSID() 2003-07-14 14:59:01 +00:00
subr_disk_mbr.c Overhaul MBR handling (part 1): 2003-10-08 04:25:43 +00:00
subr_disk.c rev.1.55 didn't handle BUFQ_SORT_CYLINDER case correctly. 2003-12-06 17:23:22 +00:00
subr_extent.c Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
subr_log.c - pass signo to fownsignal [ok by jd] 2003-09-22 12:59:55 +00:00
subr_pool.c pool_prime_page: initialize ph_time to mono_time instead of zero 2003-12-29 16:04:58 +00:00
subr_prf.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
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 Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
sys_generic.c use "poll" as the wmesg for poll. 2003-10-10 15:24:28 +00:00
sys_pipe.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
sys_pmc.c Make this compile again on i386 by avoiding an unused variable 2003-01-20 01:40:48 +00:00
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 cleanup & uniform descriptor owner handling: 2003-09-21 19:16:48 +00:00
syscalls.c regen 2004-01-02 18:53:45 +00:00
syscalls.conf we don't need sigreturn and sigcode glue if we are not compat_16 anymore. 2003-09-10 16:43:34 +00:00
syscalls.master kernel part of no-syscall upcall stack return: libpthread registers 2004-01-02 18:52:17 +00:00
sysv_ipc.c
sysv_msg.c allocate virtual memory for SYSV shm, msg and semaphore structures 2003-10-26 10:32:24 +00:00
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_conf.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
tty_pty.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
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 Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
tty_tty.c Add the gating of system calls that cause modifications to the underlying 2003-10-15 11:28:59 +00:00
tty.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
uipc_domain.c Dynamic sysctl. 2003-12-04 19:38:21 +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_mbuf.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
uipc_proto.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
uipc_sem.c add missing __KERNEL_RCSID() 2003-07-14 14:59:01 +00:00
uipc_socket2.c Cache the "adjusted" value of sb_max when sb_max is changed, in order 2003-10-21 22:55:47 +00:00
uipc_socket.c Cache the "adjusted" value of sb_max when sb_max is changed, in order 2003-10-21 22:55:47 +00:00
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 Add pool_reclaim() on pool to which we just pool_put() a buffer in 2004-01-08 23:41:14 +00:00
vfs_cache.c remove an obsolete comment. pointed by enami@ 2003-09-01 12:13:55 +00:00
vfs_getcwd.c eliminate v_id. 2003-07-30 12:10:57 +00:00
vfs_init.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
vfs_lockf.c fix uninitialized variable 2003-10-25 09:06:51 +00:00
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 Replace the traditional buffer memory management -- based on fixed per buffer 2003-12-30 12:33:13 +00:00
vfs_syscalls.c The file system snapshot pseudo driver. 2003-12-10 11:40:11 +00:00
vfs_vnops.c Add the gating of system calls that cause modifications to the underlying 2003-10-15 11:28:59 +00:00
vnode_if.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
vnode_if.sh Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
vnode_if.src Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00