alloc_pages and struct page *
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?
If there a documentation somewhere whcih would answer this kind of questions? Couldn't find anything pertinent in Documentation/*.
OG.
Quoted 3 lines · Olivier Galibert
If I get a struct page * from a call to
alloc_pageswith 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 totcp_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).
Signature · 1 line
Catalin