Subject: Re: pmap(9): pmap_zeropage, pmap_copypage
To: Bill Studenmund <wrstuden@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 08/14/2002 11:32:19
At 11:26 AM 8/14/2002, Bill Studenmund wrote:
>On Tue, 13 Aug 2002, Jason R Thorpe wrote:
>
> > On Tue, Aug 13, 2002 at 11:03:42PM -0700, Matt Thomas wrote:
> >
> >  > I could really use them in the mpc6xx pmap and it seems real
> >  > inefficient to call PHYS_TO_VM_PAGE when the caller already
> >  > has a struct vm_page *.
> >
> > Yah.  The problem was that there are some callers that don't have
> > a vm_page *.  Those need to be accomodated somehow.  I'll try to
> > look into it this week, seeing has how it would shave cycles on
> > the ARM, and I'm doing ARM performance tweaking right now for my
> > Day Job :-)
>
>Maybe pass the vm_page *, and have a special value, say -1, that indicates
>the caller doesn't know and the routine should call PHYS_TO_VM_PAGE? Or
>would it be better to have all callers call PHYS_TO_VM_PAGE?

Well, I grep'ed the kernel source couldn't find one call (outside of the
pmap.c modules themselves) that didn't do VM_PAGE_TO_PHYS in the call
or had it readily available.


-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message