summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_subr.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-09-26 06:54:32 +0000
committerdillon <dillon@FreeBSD.org>2001-09-26 06:54:32 +0000
commit9ab85c59297c02e5c30289d283cdd33f73017e7a (patch)
treec88bd0c3ce1a18ffc92eb369690f7bc61a2f3fb6 /sys/kern/kern_subr.c
parent8196536441794b09959c5c5d8d292db66f6e64f1 (diff)
downloadFreeBSD-src-9ab85c59297c02e5c30289d283cdd33f73017e7a.zip
FreeBSD-src-9ab85c59297c02e5c30289d283cdd33f73017e7a.tar.gz
Make uio_yield() a global. Call uio_yield() between chunks
in vn_rdwr_inchunks(), allowing other processes to gain an exclusive lock on the vnode. Specifically: directory scanning, to avoid a race to the root directory, and multiple child processes coring simultaniously so they can figure out that some other core'ing child has an exclusive adv lock and just exit instead. This completely fixes performance problems when large programs core. You can have hundreds of copies (forked children) of the same binary core all at once and not notice. MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r--sys/kern/kern_subr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 9f53d2d..cab78c2 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -55,8 +55,6 @@
#include <vm/vm_page.h>
#include <vm/vm_map.h>
-static void uio_yield __P((void));
-
SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV,
"Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)");
@@ -381,7 +379,7 @@ phashinit(elements, type, nentries)
return (hashtbl);
}
-static void
+void
uio_yield()
{
struct thread *td;
OpenPOWER on IntegriCloud