lkml.org 
[lkml]   [2008]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] make /proc/pid/pagemap work with huge pages and return page size
From
Date
On Thu, 2008-02-28 at 17:15 -0800, Matt Mackall wrote:
> > The only issue is that this is *after* the code has decided that a
> > particular virtual area is for huge pages. The best arch-generic
> > interface I know for that is: is_vm_hugetlb_page(), but that is
> > VMA-based. Perhaps we should change the pagemap walk to pass the VMA
> > around.
>
> I'd rather avoid that. Requiring a VMA to poke at these things shouldn't
> -really- be necessary.

Yeah, this is strictly true. But, it also assumes that we have all of
the data about where large pages are based on the contents of the
pagetables alone. It's possible that we can derive this, or code up a
bunch of arch-specific functions to do this, but it certainly doesn't
exist today. I'm just not keen on going and learning about how each and
every architecture encodes hugetlb information in their pagetables. :(

The fact is that we treat pagetables in hugetlb areas completely
differently than normal pages. All of the generic functions that deal
with pagetables magically punt over to the hugetlb code when they see a
hugetlb VMA.

I think although it isn't strictly necessary, it is going to save a ton
of work to just pass the VMAs around.

-- Dave



\
 
 \ /
  Last update: 2008-02-29 23:33    [W:0.114 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site