Subject: Re: port-mips/15965: NEW_PIPE broken on port-mips
To: Chuck Silvers <chuq@chuq.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: netbsd-bugs
Date: 03/23/2002 20:46:42
On Sat, Mar 23, 2002 at 08:34:39PM -0800, Chuck Silvers wrote:

 > the problem with using pmap_enter() instead of pmap_kenter_pa()
 > for pages that are loaned to the kernel is that we need to make
 > sure that the loan mappings for these pages are not removed by
 > pmap_page_protect(VM_PROT_NONE).  if the page loaned to the kernel
 > is owned by a vnode object and the file is truncated such that the
 > page is now past the end of the file, we need to be able to leave
 > the loan mappings alone while removing all other mappings.
 > the way to do this is to use pmap_kenter_pa() for loan mappings
 > and pmap_enter() for non-loan mappings, then pmap_page_protect()
 > removes exactly the mappings we want.

I've always been wary of this problem in the face of virtually-indexed
caches.  I think this is a fundamental problem with the loan facility.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>