Subject: Re: nathan_sw and proc flags
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: tech-kern
Date: 12/08/2001 17:46:08
Jason R Thorpe wrote:
 
>  > In the non-SA world, the proc-dependent flags are inherited from
>  > the parent in cpu_fork().  In the SA world, the flags are split
>  > between LWP-specific and proc-specific.  ISTM that current
>  > implementations of cpu_fork() do ensure the inheritance of the
>  > LWP-specific flags, but the proc-specific flags are not
>  > initialised and usually filled with junk.  The symptoms I saw
>  > where corrupted page tables on NetBSD/hp300.
> 
> I guess you mean this assignment:
> 
> 	p2->p_md.md_flags = p1->p_md.md_flags;

Yep.  Of course you cannot do that indiscriminantly.
 
>  > Since cpu_fork() doesn't know whether it is handling a process
>  > fork or an LWP fork, who is responsible for maintaing proc-specific
>  > flags?
> 
> Sounds like:
> 
> 	* cpu_fork() needs to be renamed to cpu_lwp_fork().
> 
> 	* A new cpu_proc_fork() needs to be added which would
> 	  be called by uvm_proc_fork().

Sounds good to me.

	-- Gregory McGarry <g.mcgarry@ieee.org>