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>
This commit is contained in:
Tor Egge 1998-09-28 03:34:39 +00:00
parent 8fce521a54
commit a16edda365
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39703
2 changed files with 8 additions and 2 deletions

View file

@ -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.

View file

@ -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.