Add helper for allocating and freeing discontiguous page array.
Subsystems (3)
Hi Andrew,
you suggested this helper and so I implemented it :-)
Diff is against Linus' current git. Compile tested with allyesconfig. Checked with checkpatch.
Best Regards
Ingo Oeser
Signed-off-by Ingo Oeser <[email protected]>
--- include/linux/gfp.h | 2 ++ mm/page_alloc.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 0 deletions(-)
include/linux/gfp.h +2 -0
@@ -249,5 +249,7 @@ void page_alloc_init(void);void drain_zone_pages (struct zone *zone,struct per_cpu_pages *pcp);void drain_all_pages (void );void drain_local_pages (void *dummy); +int alloc_page_array (struct page **pages,unsigned int count,gfp_t gfp_mask); +void free_page_array (struct page **pages,unsigned int count);#endif /* __LINUX_GFP_H */
mm/page_alloc.c +48 -0
54 lines not on this page · raw message
Signature · 1 line
1.5.4.3