Re: alloc_pages and struct page *

From: Catalin Marinas
Date: Tue Apr 19 2005 - 07:10:04 EST


Olivier Galibert <galibert@xxxxxxxxx> wrote:
> If I get a struct page * from a call to alloc_pages with a non-zero
> order, how do I get the struct page * of te following pages from the
> same allocation in order to use them in calls to tcp_sendpage?

page++;

The page structures are kept in an array, "mem_map" if
CONFIG_DISCONTIGMEM is not set or something like
"discontig_node_data[nid].node_mem_map" otherwise (this is true for
the ARM architecture, should be similar on the others). "alloc_pages"
allocates a contiguous range of pages from an array (and doesn't cross
a node boundary).

--
Catalin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/