freebsd-skq/sys/kern
Matthew Dillon 06ae1e91c4 This brings in a Yahoo coredump patch from Paul, with additional mods by
me (addition of vn_rdwr_inchunks).  The problem Yahoo is solving is that
if you have large process images core dumping, or you have a large number of
forked processes all core dumping at the same time, the original coredump code
would leave the vnode locked throughout.  This can cause the directory vnode
to get locked up, which can cause the parent directory vnode to get locked
up, and so on all the way to the root node, locking the entire machine up
for extremely long periods of time.

This patch solves the problem in two ways.  First it uses an advisory
non-blocking lock to abort multiple processes trying to core to the same
file.  Second (my contribution) it chunks up the writes and uses bwillwrite()
to avoid holding the vnode locked while blocking in the buffer cache.

Submitted by:	ps
Reviewed by:	dillon
MFC after:	2 weeks
2001-09-08 20:02:33 +00:00
..
bus_if.m Alter the return value and arguments of the GET_RESOURCE_LIST bus method. 2000-11-28 06:49:15 +00:00
device_if.m * Factor out the object system from new-bus so that it can be used by 2000-04-08 14:17:18 +00:00
genassym.sh Improve kernel bootstrapping: 2001-01-28 06:39:56 +00:00
imgact_aout.c This brings in a Yahoo coredump patch from Paul, with additional mods by 2001-09-08 20:02:33 +00:00
imgact_elf.c This brings in a Yahoo coredump patch from Paul, with additional mods by 2001-09-08 20:02:33 +00:00
imgact_gzip.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
imgact_shell.c Fix #! script exec under linux emulation. If a script is exec'd from a 2000-04-26 20:58:40 +00:00
inflate.c
init_main.c With Alfred's permission, remove vm_mtx in favor of a fine-grained approach 2001-07-04 16:20:28 +00:00
init_sysent.c Regenerate syscalls 2001-09-01 19:37:41 +00:00
kern_acct.c Pushdown Giant for acct(), kqueue(), kevent(), execve(), fork(), 2001-09-01 03:04:31 +00:00
kern_acl.c In the case of ACL_OTHER and undefined ACL entry id's, set 2001-09-01 23:16:02 +00:00
kern_cap.c Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
kern_clock.c - Close races with signals and other AST's being triggered while we are in 2001-08-10 22:53:32 +00:00
kern_condvar.c - Fix a bug in the previous workaround for the tsleep/endtsleep race. 2001-08-21 18:42:45 +00:00
kern_conf.c Make the fmt arguments to make_dev and make_dev_alias const char *. 2001-08-02 20:35:35 +00:00
kern_descrip.c Giant Pushdown. Saved the worst P4 tree breakage for last. 2001-09-01 19:04:37 +00:00
kern_environment.c Fix some warnings in kern_environment.c. Make the getenv*() family 2001-06-15 07:29:17 +00:00
kern_event.c Pushdown Giant for acct(), kqueue(), kevent(), execve(), fork(), 2001-09-01 03:04:31 +00:00
kern_exec.c Pushdown Giant for acct(), kqueue(), kevent(), execve(), fork(), 2001-09-01 03:04:31 +00:00
kern_exit.c Giant pushdown sys_exit(), [o]wait(), wait4() 2001-09-01 04:37:34 +00:00
kern_fork.c Pushdown Giant for acct(), kqueue(), kevent(), execve(), fork(), 2001-09-01 03:04:31 +00:00
kern_idle.c Remove #if 0'd remnants of the old idle page zeroing. 2001-09-01 20:17:43 +00:00
kern_intr.c Match the declaration in net/netisr.h. 2001-09-03 03:24:31 +00:00
kern_jail.c Pushdown Giant for acct(), kqueue(), kevent(), execve(), fork(), 2001-09-01 03:04:31 +00:00
kern_kthread.c Don't use kp->arg0 as a format string, grr. 2001-07-19 02:18:54 +00:00
kern_ktr.c - Replace the unused KTR_IDLELOOP trace class with a new KTR_WITNESS trace 2001-06-25 23:09:31 +00:00
kern_ktrace.c Remove the MPSAFE keyword from the parser for syscalls.master. 2001-08-30 18:50:57 +00:00
kern_linker.c Giant Pushdown. Saved the worst P4 tree breakage for last. 2001-09-01 19:04:37 +00:00
kern_lock.c If we've panic'd already, then just bail in lockmgr rather than blocking or 2001-08-10 23:29:15 +00:00
kern_lockf.c advlock: simplify overflow checks 2001-08-29 18:53:53 +00:00
kern_malloc.c - Remove asleep(), await(), and M_ASLEEP. 2001-08-10 06:45:43 +00:00
kern_mib.c Fix cut/paste blunder. Serves me right for doing a last minute tweak 2001-07-27 15:52:49 +00:00
kern_module.c Giant Pushdown. Saved the worst P4 tree breakage for last. 2001-09-01 19:04:37 +00:00
kern_mutex.c Force a commit on kern_mutex.c to explain reason for last commit but while 2001-08-24 23:00:59 +00:00
kern_ntptime.c Pushdown Giant for: profil(), ntp_adjtime(), ogethostname(), 2001-09-01 05:47:58 +00:00
kern_physio.c Separate the struct bio related stuff out of <sys/buf.h> into 2000-05-05 09:59:14 +00:00
kern_proc.c Fix part of another problem that bde pointed out. This is different 2001-08-16 23:43:24 +00:00
kern_prot.c Giant Pushdown. Saved the worst P4 tree breakage for last. 2001-09-01 19:04:37 +00:00
kern_random.c This patchset fixes a large number of file descriptor race conditions. 2000-11-18 21:01:04 +00:00
kern_resource.c Use sched_lock to protect rtp_to_pri() and pri_to_rtp() when needed. 2001-09-02 01:05:36 +00:00
kern_sema.c Implement kernel semaphores. 2001-08-14 22:13:14 +00:00
kern_shutdown.c Sigh. Dig up text from a signature in a 1994 Usenet post I made and redo 2001-09-05 23:51:06 +00:00
kern_sig.c This brings in a Yahoo coredump patch from Paul, with additional mods by 2001-09-08 20:02:33 +00:00
kern_subr.c Remove spl's in uio_yield() that are covered by the sched_lock. 2001-07-03 15:58:37 +00:00
kern_switch.c Spelling fix in a KASSERT: runq_chose -> runq_choose. 2001-07-04 20:00:48 +00:00
kern_sx.c Use witness_upgrade/downgrade for sx_try_upgrade/downgrade. 2001-08-23 22:51:22 +00:00
kern_synch.c Make yield() MPSAFE. 2001-09-01 03:54:09 +00:00
kern_syscalls.c sysvipc loadable. 2000-12-01 08:57:47 +00:00
kern_sysctl.c Giant Pushdown 2001-09-01 18:19:21 +00:00
kern_tc.c Remove a bogus #ifdef KTR stanza. 2001-01-01 23:09:53 +00:00
kern_time.c Giant Pushdown 2001-09-01 18:19:21 +00:00
kern_timeout.c Move most of the kernel submap initialization code, including the 2001-08-22 04:07:27 +00:00
kern_xxx.c Pushdown Giant for: profil(), ntp_adjtime(), ogethostname(), 2001-09-01 05:47:58 +00:00
ksched.c Protect pri_to_rtp() with sched_lock when needed. 2001-09-02 00:52:11 +00:00
link_aout.c With this commit, I hereby pronounce gensetdefs past its use-by date. 2001-06-13 10:58:39 +00:00
link_elf_obj.c Unindent a if (1) { that was left behind in the last commit. 2001-09-03 04:39:38 +00:00
link_elf.c Unindent a if (1) { that was left behind in the last commit. 2001-09-03 04:39:38 +00:00
linker_if.m With this commit, I hereby pronounce gensetdefs past its use-by date. 2001-06-13 10:58:39 +00:00
Make.tags.inc Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
Makefile Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
makeobjops.pl revert previous commit (bad style and not needed) 2001-07-22 10:24:31 +00:00
makesyscalls.sh Fix the definition generation code from rev 1.15 that generates non-style(9) 2001-09-05 01:27:53 +00:00
md4c.c Import kernel part of SMB/CIFS requester. 2001-04-10 07:59:06 +00:00
md5c.c Add ia64 support. 2000-09-29 13:36:47 +00:00
p1003_1b.c Make various posix4 system calls MPSAFE (will fixup syscalls.master later) 2001-08-31 22:34:40 +00:00
posix4_mib.c Add $FreeBSD$. 2000-04-22 15:13:06 +00:00
subr_acl_posix1e.c In the case of ACL_OTHER and undefined ACL entry id's, set 2001-09-01 23:16:02 +00:00
subr_autoconf.c Back out the previous change to the queue(3) interface. 2000-05-26 02:09:24 +00:00
subr_blist.c With Alfred's permission, remove vm_mtx in favor of a fine-grained approach 2001-07-04 16:20:28 +00:00
subr_bus.c Move the hints gunk to a seperate file. It isn't really part of the 2001-07-14 08:25:18 +00:00
subr_clist.c Make cblock_alloc_cblocks() spell its own name 2001-03-27 10:21:26 +00:00
subr_devstat.c Export the head structure for the device statistics STAILQ in 2001-08-04 18:02:47 +00:00
subr_disk.c Don't dump on the label sector or below. This avoids clobbering the 2001-08-15 11:35:45 +00:00
subr_disklabel.c Create a general facility for making dev_t's depend on another 2001-05-26 08:27:58 +00:00
subr_diskmbr.c Create a general facility for making dev_t's depend on another 2001-05-26 08:27:58 +00:00
subr_diskslice.c Create a general facility for making dev_t's depend on another 2001-05-26 08:27:58 +00:00
subr_eventhandler.c Don't try to find an eventhandler list if the list of lists hasn't 2001-07-31 03:52:16 +00:00
subr_hints.c Go back to having either static OR dynamic hints, with fallback 2001-07-14 00:23:10 +00:00
subr_kobj.c Convert more malloc+bzero to malloc+M_ZERO. 2000-12-08 21:51:06 +00:00
subr_log.c syslogd gets kernel log messages only once every 30 seconds or 2001-05-23 19:02:50 +00:00
subr_mbuf.c Rename mb_init() mbuf subsystem initialization routine to mbuf_init(), in 2001-08-03 05:05:32 +00:00
subr_mchain.c Remove superfluous m_pkthdr.rcv_if = NULL assignment following 2001-02-25 06:33:50 +00:00
subr_module.c Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
subr_param.c Conditionalize VM_SWZONE_SIZE_MAX and VM_BCACHE_SIZE_MAX so MD sections 2001-08-20 16:29:13 +00:00
subr_pcpu.c - Split out the support for per-CPU data from the SMP code. UP kernels 2001-05-10 17:45:49 +00:00
subr_prf.c Make the code to read the kernel message buffer via sysctl machine- 2001-07-03 19:44:07 +00:00
subr_prof.c Pushdown Giant for: profil(), ntp_adjtime(), ogethostname(), 2001-09-01 05:47:58 +00:00
subr_rman.c Handle NULL struct device *s 2001-05-28 01:00:03 +00:00
subr_sbuf.c Constify the format string. 2001-07-03 21:46:43 +00:00
subr_scanf.c
subr_smp.c - Close races with signals and other AST's being triggered while we are in 2001-08-10 22:53:32 +00:00
subr_taskqueue.c remove include of ipl.h because it no longer exists 2001-05-16 02:52:06 +00:00
subr_trap.c Remove the MPSAFE keyword from the parser for syscalls.master. 2001-08-30 18:50:57 +00:00
subr_turnstile.c Force a commit on kern_mutex.c to explain reason for last commit but while 2001-08-24 23:00:59 +00:00
subr_witness.c Style nits: 2001-08-24 17:46:58 +00:00
subr_xxx.c Extend kqueue down to the device layer. 2001-02-15 16:34:11 +00:00
sys_generic.c Giant Pushdown: 2001-09-01 19:34:23 +00:00
sys_pipe.c cleanup: GIANT macros, rename DEPRECIATE to DEPRECATE 2001-07-04 17:11:03 +00:00
sys_process.c Zap 'ptrace(PT_READ_U, ...)' and 'ptrace(PT_WRITE_U, ...)' since they 2001-08-08 05:25:15 +00:00
sys_socket.c Don't bother passing p to rtioctl just so it can fail to pass it to mrt_ioctl 2001-07-25 20:15:28 +00:00
syscalls.c Regenerate syscalls 2001-09-01 19:37:41 +00:00
syscalls.master Synchronize syscalls.master(s) with recent Giant pushdown work 2001-09-01 19:36:48 +00:00
sysv_ipc.c sysvipc loadable. 2000-12-01 08:57:47 +00:00
sysv_msg.c Giant Pushdown: sysv shm, sem, and msg calls. 2001-08-31 00:02:18 +00:00
sysv_sem.c Giant Pushdown: sysv shm, sem, and msg calls. 2001-08-31 00:02:18 +00:00
sysv_shm.c Giant Pushdown: sysv shm, sem, and msg calls. 2001-08-31 00:02:18 +00:00
tty_compat.c
tty_conf.c Unstaticize l_nullioctl; it is needed elsewhere (like in tty_snoop.c). 2001-06-04 23:30:47 +00:00
tty_cons.c With this commit, I hereby pronounce gensetdefs past its use-by date. 2001-06-13 10:58:39 +00:00
tty_pty.c Don't remove the SI_CHEAPCLONE for unsupported minors 2001-06-18 09:22:30 +00:00
tty_subr.c Make cblock_alloc_cblocks() spell its own name 2001-03-27 10:21:26 +00:00
tty_tty.c Support /dev/ctty again 2001-05-15 18:12:38 +00:00
tty.c Export the tk_nin and tk_nout variables (number of tty input/output 2001-08-04 18:09:24 +00:00
uipc_accf.c Revert the last bits of my bogus move of NMBCLUSTERS 2001-06-01 21:47:34 +00:00
uipc_domain.c Sync with recent KAME. 2001-06-11 12:39:29 +00:00
uipc_mbuf2.c Sync with recent KAME. 2001-06-11 12:39:29 +00:00
uipc_mbuf.c Forgot to remove this un-needed test. (M_WAITOK won't fail) 2001-08-19 04:30:13 +00:00
uipc_proto.c Implement a LOCAL_PEERCRED socket option which returns a 2001-08-17 22:01:18 +00:00
uipc_sockbuf.c Fix up indentation. 2001-06-29 04:01:38 +00:00
uipc_socket2.c Fix up indentation. 2001-06-29 04:01:38 +00:00
uipc_socket.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
uipc_syscalls.c Giant pushdown syscalls in kern/uipc_syscalls.c. Affected calls: 2001-08-31 00:37:34 +00:00
uipc_usrreq.c Forgot to remove this un-needed test. (M_WAITOK won't fail) 2001-08-19 04:30:13 +00:00
vfs_acl.c In the case of ACL_OTHER and undefined ACL entry id's, set 2001-09-01 23:16:02 +00:00
vfs_aio.c Check validity of signal callback requested via aio routines. 2001-04-18 22:18:39 +00:00
vfs_bio.c Remove the code that limited the buffer_map to 1/2 the size of the 2001-08-22 18:10:37 +00:00
vfs_cache.c Fix a memory leak in __getcwd() that can occur after a filesystem 2001-09-04 19:03:47 +00:00
vfs_cluster.c With Alfred's permission, remove vm_mtx in favor of a fine-grained approach 2001-07-04 16:20:28 +00:00
vfs_conf.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
vfs_default.c With Alfred's permission, remove vm_mtx in favor of a fine-grained approach 2001-07-04 16:20:28 +00:00
vfs_export.c Since the netexport struct was centralised to 'struct mount', 2001-05-29 17:46:52 +00:00
vfs_extattr.c lseek: simplify overflow checks 2001-08-29 18:35:53 +00:00
vfs_init.c Revert consequences of changes to mount.h, part 2. 2001-04-29 02:45:39 +00:00
vfs_lookup.c After exhaustive discussions and some meandering and confusion, enough 2001-06-24 05:24:41 +00:00
vfs_mount.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
vfs_subr.c If a file has been completely unlinked, stop automatically syncing the 2001-08-27 06:09:56 +00:00
vfs_syscalls.c lseek: simplify overflow checks 2001-08-29 18:35:53 +00:00
vfs_vnops.c This brings in a Yahoo coredump patch from Paul, with additional mods by 2001-09-08 20:02:33 +00:00
vnode_if.pl replace calls to non-existant bail() subroutine with calls to 2001-03-23 11:48:50 +00:00
vnode_if.src correct description of `vpp' for mknod/symlink: they are actually 2001-07-24 16:16:00 +00:00