From: Christoph Lameter Re-export drain_local_pages() again and use it for software suspend: Signed-off-by: Christoph Lameter Cc: "Rafael J. Wysocki" Cc: Daniel Walker Signed-off-by: Andrew Morton --- include/linux/gfp.h | 1 + kernel/power/snapshot.c | 2 +- mm/page_alloc.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff -puN include/linux/gfp.h~page-allocator-clean-up-pcp-draining-functions-swsusp-fix include/linux/gfp.h --- a/include/linux/gfp.h~page-allocator-clean-up-pcp-draining-functions-swsusp-fix +++ a/include/linux/gfp.h @@ -229,5 +229,6 @@ extern void FASTCALL(free_cold_page(stru 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); #endif /* __LINUX_GFP_H */ diff -puN kernel/power/snapshot.c~page-allocator-clean-up-pcp-draining-functions-swsusp-fix kernel/power/snapshot.c --- a/kernel/power/snapshot.c~page-allocator-clean-up-pcp-draining-functions-swsusp-fix +++ a/kernel/power/snapshot.c @@ -1203,7 +1203,7 @@ asmlinkage int swsusp_save(void) printk(KERN_INFO "PM: Creating hibernation image: \n"); - drain_all_pages(); + drain_local_pages(NULL); nr_pages = count_data_pages(); nr_highmem = count_highmem_pages(); printk(KERN_INFO "PM: Need to copy %u pages\n", nr_pages + nr_highmem); diff -puN mm/page_alloc.c~page-allocator-clean-up-pcp-draining-functions-swsusp-fix mm/page_alloc.c --- a/mm/page_alloc.c~page-allocator-clean-up-pcp-draining-functions-swsusp-fix +++ a/mm/page_alloc.c @@ -925,7 +925,7 @@ static void drain_pages(unsigned int cpu /* * Spill all of this CPU's per-cpu pages back into the buddy allocator. */ -static void drain_local_pages(void *arg) +void drain_local_pages(void *arg) { drain_pages(smp_processor_id()); } _