question about amd64 pagetable page allocation.

vasanth rao naik sabavat vasanth.raonaik at gmail.com
Tue Apr 3 15:18:12 UTC 2012


Hello Mark,

Thank you for replying,

Could you please point me to any document which illustrates the
implementation of recursive page tables in FreeBSD for amd64.

Also, I just found that with the following patch from Alon, the usage of
vtopte() is removed in pmap_remove_pages(). Why was this removed?

http://lists.freebsd.org/pipermail/svn-src-all/2009-March/006006.html

Thanks,
Vasanth

On Tue, Apr 3, 2012 at 10:56 AM, Mark Tinguely <marktinguely at gmail.com>wrote:

> On Tue, Apr 3, 2012 at 8:33 AM, vasanth rao naik sabavat
> <vasanth.raonaik at gmail.com> wrote:
> > Hi,
> >
> > I am trying to understand the page table page allocation for a process in
> > FBSD6.1. I see that the page table pages are allocated by
> vm_page_alloc().
> > I believe the virtual address for this allocated page can be derived by
> > PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)), however when I compare this address
> with
> > the virtual address accessed in pmap_remove_pages() they are not the
> same.
> >
> > The virtual address of a *PTE in pmap_remove_pages() is something like
> > *0xffff800000643200
> > *
> > However, the virtual address of the page allocated by vm_page_alloc() is
>  *
> > 0xffffff033c6a0000
> >
> > *I would also like to understand the importance of loc_PTmap, I believe
> the
> > pmap_remove_pages() is derving the page table page addresses from
> loc_PTmap?
> > (kgdb) p loc_PTmap
> > Cannot access memory at address 0xffff800000000000
> >
> > How do we relate the loc_PTmap to the page table pages allocated by
> > vm_page_alloc() in _pmap_allocpte().
> >
> > Thanks,
> > Vasanth
>
>
>
> The answer to your questions will be more obvious when you get an
> understanding of the Recursive Page Tables.
>
> --Mark Tinguely.
>


More information about the freebsd-hackers mailing list