Subject: PR/25599 CVS commit: src/sys/arch/alpha/alpha
To: None <port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Jason R Thorpe <thorpej@netbsd.org>
List: netbsd-bugs
Date: 07/26/2005 04:12:02
The following reply was made to PR port-alpha/25599; it has been noted by GNATS.

From: Jason R Thorpe <thorpej@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/25599 CVS commit: src/sys/arch/alpha/alpha
Date: Tue, 26 Jul 2005 04:11:54 +0000 (UTC)

 Module Name:	src
 Committed By:	thorpej
 Date:		Tue Jul 26 04:11:54 UTC 2005
 
 Modified Files:
 	src/sys/arch/alpha/alpha: pmap.c
 
 Log Message:
 1. Disable the lazy allocation of lev1map in pmap_enter(), instead doing
    it in pmap_create(), and freeing the lev1map in pmap_destroy().  This
    means that pm_lev1map is consistent for the life of the pmap.
 2. pmap_extract() now uses vtophys() for the kernel pmap.  This avoids
    having to lock the kernel pmap, since kernel PT pages are never freed.
 3. Because of (1), pmap_asn_alloc() no longer needs to operate on a locked
    pmap; pm_lev1map will never change over the life of the pmap, and all
    other access to the pmap is done in per-CPU fields or with atomic
    operations.
 4. Because of (3), pmap_activate() no longer needs to lock the pmap
    to do its work, thus eliminating the deadlock with sched_lock described
    in PR port-alpha/25599.  This is safe because we are guaranteed that
    the pmap is still alive, since by definition an LWP that uses that it
    is about to run.
 
 Thanks to Michael Hitch for the analysis, and Michael and Ragge for testing.
 
 
 To generate a diff of this commit:
 cvs rdiff -r1.210 -r1.211 src/sys/arch/alpha/alpha/pmap.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.