On 28-04-08 22:15, Rene Herman wrote:
On 27-04-08 18:44, Robert P. J. Day wrote:
so what does that comment mean? it seems to be exactly backwards
from what i'm used to believing.
The comment seems confused yes. alloc_pages() is just the buddy
allocator and gets you contiguous pages. For vmalloc() purposes, an
array of struct page * is allocated, allocating one page at a time with
alloc_page() (in __vmalloc_area_node).
Err. That's more me who seems confused. The vmalloc() bit is correct and
yes, alloc_pages() is "just the buddy allocator and gets you [physically]
contiguous pages" but that in fact ofcourse means the comment is fine. The
single struct page * is fine for a higher order alloc_pages, since its's
adjacent struct page pointers in the mem_map. That is:
struct page *page = alloc_pages(gfp_mask, order);
means your struct page structures are at *page to *(page + 2^order) in the
node's mem_map, even if they are highmem pages.
Rene.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ