From 9ab85c59297c02e5c30289d283cdd33f73017e7a Mon Sep 17 00:00:00 2001 From: dillon Date: Wed, 26 Sep 2001 06:54:32 +0000 Subject: 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 --- sys/kern/imgact_aout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/imgact_aout.c') 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); } -- cgit v1.1