Skip to contentSkip to conversation

Add helper for allocating and freeing discontiguous page array.

PATCH/RFC Ingo Oeser 1 participant 1 message Oct 14, 2008

Subsystems (3)
lore
Share & tools
lore

Ingo Oeser

author
#0 lore raw

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

---
 include/linux/gfp.h |    2 ++
 mm/page_alloc.c     |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)
include/linux/gfp.h +2 -0
index e8003af..0e2453a 100644
@@ -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