From e708a51bd07dddb6f2ec25c0062c59bde36f25f5 Mon Sep 17 00:00:00 2001 From: tegge Date: Mon, 28 Sep 1998 03:34:39 +0000 Subject: 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 --- sys/amd64/amd64/vm_machdep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/amd64/amd64/vm_machdep.c') 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. -- cgit v1.1