freebsd-nq/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
device_if.m
genassym.sh
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
imgact_shell.c
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
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
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
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
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
kern_sysctl.c Giant Pushdown 2001-09-01 18:19:21 +00:00
kern_tc.c
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
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
Make.tags.inc
Makefile
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
md5c.c
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
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
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
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
subr_diskmbr.c
subr_diskslice.c
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
subr_log.c
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
subr_module.c
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
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
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
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
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
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
tty_cons.c
tty_pty.c
tty_subr.c
tty_tty.c
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
uipc_domain.c
uipc_mbuf2.c
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
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
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
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
vfs_extattr.c lseek: simplify overflow checks 2001-08-29 18:35:53 +00:00
vfs_init.c
vfs_lookup.c
vfs_mount.c
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
vnode_if.src correct description of `vpp' for mknod/symlink: they are actually 2001-07-24 16:16:00 +00:00