On Wed, Nov 05, 2008 at 09:43:40AM -0600, Adam Litke wrote:
> On Wed, 2008-11-05 at 14:02 +0000, Mel Gorman wrote:
> > @@ -127,6 +140,34 @@ void *get_huge_pages(size_t len, ghp_t flags)
> > return NULL;
> > }
> >
> > +offset:
>
> This cache-coloring code (below) is nice. Could we move it into it's
> own function though? I like the idea of caching the sysconf value, but
> perhaps you could do that as a static variable within the new
> function.
Yeah, I don't think this belongs in get_huge_pages().
get_huge_pages() is supposed to be the "raw" low-level interface to
just grab some hugepages. Offsetting within the page should be up to
the caller, if it cares.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel