diff options
author | tegge <tegge@FreeBSD.org> | 1998-09-28 03:34:39 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-09-28 03:34:39 +0000 |
commit | e708a51bd07dddb6f2ec25c0062c59bde36f25f5 (patch) | |
tree | 78e648a0506434ac1bce5179b18430ce94045efb /sys/amd64 | |
parent | 1b80829d9cc3aff20819ea2b5fa48e43ccc9f010 (diff) | |
download | FreeBSD-src-e708a51bd07dddb6f2ec25c0062c59bde36f25f5.zip FreeBSD-src-e708a51bd07dddb6f2ec25c0062c59bde36f25f5.tar.gz |
Initialize pcb_mpnest to 1 in the child process in cpu_fork(). This should
fix the 50% idle problem that the ELF /sbin/init triggered. The problem
appeared when the last context switch before a fork() call was due to
the kernel faulting in user pages via normal page faults (e.g. copyin).
Reviewed by: Peter Wemm <peter@netplex.com.au>
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 8c0b274..fb0e601 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.109 1998/08/18 07:46:58 msmith Exp $ + * $Id: vm_machdep.c,v 1.110 1998/09/25 17:34:48 peter Exp $ */ #include "npx.h" @@ -159,6 +159,9 @@ cpu_fork(p1, p2) * pcb2->pcb_onfault: cloned above (always NULL here?). */ +#ifdef SMP + pcb2->pcb_mpnest = 1; +#endif #ifdef VM86 /* * XXX don't copy the i/o pages. this should probably be fixed. |