summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_aout.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/imgact_aout.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/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 3ec8f5f..5a53581 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -269,14 +269,14 @@ aout_coredump(td, vp, limit)
error = vn_rdwr(UIO_WRITE, vp, vm->vm_daddr,
(int)ctob(vm->vm_dsize),
(off_t)ctob(UAREA_PAGES + KSTACK_PAGES), UIO_USERSPACE,
- IO_UNIT, cred, (int *) NULL, td);
+ IO_UNIT | IO_DIRECT, cred, (int *) NULL, td);
if (error == 0)
error = vn_rdwr_inchunks(UIO_WRITE, vp,
(caddr_t) trunc_page(USRSTACK - ctob(vm->vm_ssize)),
round_page(ctob(vm->vm_ssize)),
(off_t)ctob(UAREA_PAGES + KSTACK_PAGES) +
ctob(vm->vm_dsize), UIO_USERSPACE,
- IO_UNIT, cred, (int *) NULL, td);
+ IO_UNIT | IO_DIRECT, cred, (int *) NULL, td);
return (error);
}
OpenPOWER on IntegriCloud