freebsd-skq/sys/kern
bde 09d13c3c83 Fixed livelock in getnewbuf().
It is possible for multiple process to sleep concurrently waiting
for a buffer.  When the buffer shortage is a shortage of space but
not a shortage of buffer headers, the processes took turns creating
empty buffers and waking each other to advertise the brelse() of
the empties; progress was never made because tsleep() always found
another high-priority process to run and everything was done at
splbio(), so vfs_update never had a chance to flush delayed writes,
not to mention that i/o never had a chance to complete.

The problem seems to be rare in practice, but it can easily be
reproduced by misusing block devices, at least for sufficently slow
devices on machines with a sufficiently small buffer cache.  E.g.,
`tar cvf /dev/fd0 /kernel' on an 8MB system with no disk in fd0
causes the problem quickly; the same command with a disk in fd0
causes the problem not quite as quickly; and people have reported
problems newfs'ing file systems on block devices.

Block devices only cause this problem indirectly.  They are pessimized
for time and space, and the space pessimization causes the shortage
(it manifests as internal fragmentation in buffer_map).

This should be fixed in 2.2.
1997-06-13 08:30:40 +00:00
..
imgact_aout.c Fully implement vfork. Vfork is now much much faster than even our 1997-04-13 01:48:35 +00:00
imgact_elf.c Fully implement vfork. Vfork is now much much faster than even our 1997-04-13 01:48:35 +00:00
imgact_gzip.c Fully implement vfork. Vfork is now much much faster than even our 1997-04-13 01:48:35 +00:00
imgact_shell.c Don't clobber user space argv0 memory on shell exec, mainly for vfork() 1997-04-23 22:07:05 +00:00
inflate.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
init_main.c Don't need "opt_smp.h" on these files 1997-05-29 04:52:04 +00:00
init_smp.c removed the "#error ..." line preventing casual invokation of SMP_AUTOSTART. 1997-05-06 07:10:06 +00:00
init_sysent.c Regenerate 1997-06-01 08:56:12 +00:00
init_sysvec.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_acct.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
kern_clock.c Man the liferafts! Here comes the long awaited SMP -> -current merge! 1997-04-26 11:46:25 +00:00
kern_conf.c tiny spelling fix in comment 1997-06-02 04:56:38 +00:00
kern_descrip.c Removed support for OLD_PIPE. <sys/stat.h> is now missing the hack that 1997-04-09 16:53:45 +00:00
kern_exec.c Don't clobber user space argv0 memory on shell exec, mainly for vfork() 1997-04-23 22:07:05 +00:00
kern_exit.c Remove cruft relating to p_selbits and p_selbits_size 1997-05-22 07:25:20 +00:00
kern_fork.c Don't need "opt_smp.h" on these files 1997-05-29 04:52:04 +00:00
kern_intr.c Add safety check in case "conflicts" keyword specified more times than 1997-06-08 17:15:31 +00:00
kern_ktrace.c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined. 1997-03-23 03:37:54 +00:00
kern_linker.c This is the kernel linker. To use it, you will first need to apply 1997-05-07 16:05:47 +00:00
kern_lkm.c Make MOD_* macros almost consistent: 1997-04-06 11:14:13 +00:00
kern_lock.c Fixed commented-out Lite2 sysctl debug.lockpausetime. 1997-04-01 10:18:51 +00:00
kern_lockf.c Use OID_AUTO instead of a magic number for Lite2 sysctl debug.lockf_debug. 1997-04-01 10:30:06 +00:00
kern_malloc.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_mib.c Attach vfs_sysctl() one level lower so that only the levels below 1997-03-04 18:31:56 +00:00
kern_module.c This is the kernel linker. To use it, you will first need to apply 1997-05-07 16:05:47 +00:00
kern_ntptime.c Update our kernel ntp code to the latest from David Mills. The main change 1996-12-30 18:26:28 +00:00
kern_opt.c Added a copyright and restored order. 1997-02-28 10:14:24 +00:00
kern_physio.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_proc.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
kern_prot.c Don't incorrectly set P_SUGID in setre[ug]id() for no reason, as noticed 1997-04-02 17:05:49 +00:00
kern_random.c don't #ifdef out reference to i586_ctr_freq. 1997-05-04 14:28:22 +00:00
kern_resource.c Man the liferafts! Here comes the long awaited SMP -> -current merge! 1997-04-26 11:46:25 +00:00
kern_shutdown.c Move the printing of "cpu#%d" to AFTER the general panic argument string. 1997-05-24 18:35:44 +00:00
kern_sig.c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined. 1997-03-23 03:37:54 +00:00
kern_subr.c Define NPRIMES in terms of the number of elements in 'primes' (as opposed 1997-05-28 00:47:27 +00:00
kern_synch.c Man the liferafts! Here comes the long awaited SMP -> -current merge! 1997-04-26 11:46:25 +00:00
kern_sysctl.c Include <sys/buf.h> instead of <sys/vnode.h>. kern_sysctl.c no 1997-04-09 15:23:09 +00:00
kern_tc.c Man the liferafts! Here comes the long awaited SMP -> -current merge! 1997-04-26 11:46:25 +00:00
kern_time.c oops, fix a braino that I noticed during the commit.. Don't verify the 1997-06-01 09:05:19 +00:00
kern_timeout.c Man the liferafts! Here comes the long awaited SMP -> -current merge! 1997-04-26 11:46:25 +00:00
kern_xxx.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
link_aout.c This is the kernel linker. To use it, you will first need to apply 1997-05-07 16:05:47 +00:00
Make.tags.inc Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
Makefile Remove bogus architectures to allow make tags to work. 1996-03-31 18:53:43 +00:00
makesyscalls.sh Make sure we touch all the temporary files at startup, because we assume 1997-03-29 11:11:18 +00:00
md5c.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_autoconf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_clist.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
subr_disklabel.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_diskmbr.c Avoid division by 0 in check_part(). (It occurred when max_nsectors == 0. 1997-04-19 14:14:17 +00:00
subr_diskslice.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
subr_dkbad.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_log.c Don't include <sys/ioctl.h> in the kernel. Stage 4: include 1997-03-24 11:52:29 +00:00
subr_param.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_prf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_prof.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_rlist.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_smp.c Change isa_device.h to intr_machdep.h 1997-06-02 10:44:08 +00:00
subr_trap.c Preserve %fs and %gs across context switches. This has a relatively low 1997-06-07 04:36:10 +00:00
subr_xxx.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sys_generic.c Don't include <sys/ioctl.h> in the kernel. Stage 4: include 1997-03-24 11:52:29 +00:00
sys_pipe.c Removed support for OLD_PIPE. <sys/stat.h> is now missing the hack that 1997-04-09 16:53:45 +00:00
sys_process.c Remove bogon from previous commit: doubly included sys/systm.h. 1997-04-27 21:26:29 +00:00
sys_socket.c The long-awaited mega-massive-network-code- cleanup. Part I. 1997-04-27 20:01:29 +00:00
syscalls.c Regenerate 1997-06-01 08:56:12 +00:00
syscalls.master New syscall, signanosleep(), which is a hybrid of sigsuspend(2) and 1997-06-01 08:52:38 +00:00
sysv_ipc.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sysv_msg.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sysv_sem.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sysv_shm.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_compat.c Don't include <sys/ioctl.h> in the kernel. Stage 5: include 1997-03-24 12:03:06 +00:00
tty_conf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_cons.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_pty.c Don't include <sys/ioctl.h> in the kernel. Stage 5: include 1997-03-24 12:03:06 +00:00
tty_snoop.c Don't include <sys/ioctl.h> in the kernel. Stage 3: include 1997-03-24 11:37:53 +00:00
tty_subr.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
tty_tb.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_tty.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
tty.c Don't include <sys/ioctl.h> in the kernel. Stage 5: include 1997-03-24 12:03:06 +00:00
uipc_domain.c The long-awaited mega-massive-network-code- cleanup. Part I. 1997-04-27 20:01:29 +00:00
uipc_mbuf.c Create a new branch of the kernel MIB, kern.ipc, to store 1997-02-24 20:30:58 +00:00
uipc_proto.c The long-awaited mega-massive-network-code- cleanup. Part I. 1997-04-27 20:01:29 +00:00
uipc_sockbuf.c Attempt to convert the ip_divert code to use the new-style protocol request 1997-05-24 17:23:11 +00:00
uipc_socket2.c Attempt to convert the ip_divert code to use the new-style protocol request 1997-05-24 17:23:11 +00:00
uipc_socket.c The long-awaited mega-massive-network-code- cleanup. Part I. 1997-04-27 20:01:29 +00:00
uipc_syscalls.c The long-awaited mega-massive-network-code- cleanup. Part I. 1997-04-27 20:01:29 +00:00
uipc_usrreq.c The long-awaited mega-massive-network-code- cleanup. Part I. 1997-04-27 20:01:29 +00:00
vfs_bio.c Fixed livelock in getnewbuf(). 1997-06-13 08:30:40 +00:00
vfs_cache.c 1. Add a {pointer, v_id} pair to the vnode to store the reference to the 1997-05-04 09:17:38 +00:00
vfs_cluster.c Don't zero b_dirtyoff and b_dirtyend on error. 1997-04-25 11:14:00 +00:00
vfs_conf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vfs_export.c Disabled the kern.vnode sysctl variable. It's causing system crashes on 1997-06-10 02:48:08 +00:00
vfs_extattr.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vfs_init.c Moved vfs sysctls to where Lite2 put them. No code changes yet. 1997-03-02 11:06:22 +00:00
vfs_lookup.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vfs_mount.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vfs_subr.c Disabled the kern.vnode sysctl variable. It's causing system crashes on 1997-06-10 02:48:08 +00:00
vfs_syscalls.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vfs_vnops.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vnode_if.pl Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vnode_if.sh Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vnode_if.src This is the kernel Lite/2 commit. There are some requisite userland 1997-02-10 02:22:35 +00:00