Subject: Re: Some VAX pmap observations
To: None <>
From: Anders Magnusson <>
List: port-vax
Date: 04/29/2002 19:21:12
> The work the VAX pmap does in cpu_swapout() and cpu_swapin() seems
> totally unnecessary:
> 	* Before a process is swapped out, pmap_collect() is called to
> 	  release any resources for that process.  cpu_swapout() doesn't
> 	  really need to do it; the work should be in pmap_collect().
pmap_deactivate() needs the struct proc * to know which process to
"detach" from the current pmap (or actually which pcb).

> 	* cpu_swapin() shouldn't need to validate all of the PTEs for
> 	  the U-area, since the upper levels in the VM system explicitly
> 	  wire the space, so pmap_enter() will be called to do the job.
> 	  The only think you really need to do there is to set the redzone
> 	  PTE.
pmap_enter() enter pages with the valid bit not set in the pte to be
able to simulate the non-existing reference bit. The kernel stack is
not legal to have invalid, therefore the valid bit must be set in 
each pte.

Due to a recent change (some year ago or so) the valid bit in the pte 
is already set in pmap_enter() on wired pages, so this small loop can
probably be removed :-)

-- Ragge