Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2002 23:02:48 +0200
From:      Thomas Moestl <tmm@FreeBSD.org>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern sys_pipe.c
Message-ID:  <20020412210248.GB290@crow.dom2ip.de>
In-Reply-To: <Pine.GSO.4.33.0204121536490.11123-100000@cs.rice.edu>
References:  <200204121938.g3CJcfk69260@freefall.freebsd.org> <Pine.GSO.4.33.0204121536490.11123-100000@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2002/04/12 at 15:42:37 -0500, Alan Cox wrote:
> 
> 
> On Fri, 12 Apr 2002, Thomas Moestl wrote:
> 
> > tmm         2002/04/12 12:38:41 PDT
> >
> >   Modified files:
> >     sys/kern             sys_pipe.c
> >   Log:
> >   Do not use pmap_kextract() to find out the physical address of a user
> >   belong to a user virtual address; while this happens to work on some
> >   architectures, it can't on sparc64, since user and kernel virtual
> >   address spaces overlap there (the distinction between them is done via
> >   separate address space identifiers).
> >
> 
> Why not pmap_extract() on the map->pmap?  pmap_extract() is the equivalent
> of pmap_kextract() for ordinary pmap's, i.e., not the kernel pmap.

Since a pmap module is allowed to drop a mapping at any time, this
would unnecessarily open a race between the vm_fault_quick() and the
pmap_extract() which might bite us later SMPng-wise.
The same is in a way true for the code I committed (a pageout may
happen in between), but that should be easy to fix when it is required
(by just replacing the vm_fault_quick()/vm_page_wire() sequence with a
vm_fault_user_wire()). 

	- thomas

-- 
Thomas Moestl <tmoestl@gmx.net>	http://www.tu-bs.de/~y0015675/
              <tmm@FreeBSD.org>	http://people.FreeBSD.org/~tmm/
PGP fingerprint: 1C97 A604 2BD0 E492 51D0  9C0F 1FE6 4F1D 419C 776C

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020412210248.GB290>