aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-02-05 01:29:11 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:17 -0500
commit9f8f2172537de7af0b0fbd33502d18d52b1339bc (patch)
tree273c86583ed0295059c5526d3bd6927520a20add /kernel
parente2848a0efedef4dad52d1334d37f8719cd6268fd (diff)
Page allocator: clean up pcp draining functions
- Add comments explaing how drain_pages() works. - Eliminate useless functions - Rename drain_all_local_pages to drain_all_pages(). It does drain all pages not only those of the local processor. - Eliminate useless interrupt off / on sequences. drain_pages() disables interrupts on its own. The execution thread is pinned to processor by the caller. So there is no need to disable interrupts. - Put drain_all_pages() declaration in gfp.h and remove the declarations from suspend.h and from mm/memory_hotplug.c - Make software suspend call drain_all_pages(). The draining of processor local pages is may not the right approach if software suspend wants to support SMP. If they call drain_all_pages then we can make drain_pages() static. [akpm@linux-foundation.org: fix build] Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index f6a5df934f8d..95250d7c8d91 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1203,7 +1203,7 @@ asmlinkage int swsusp_save(void)
1203 1203
1204 printk(KERN_INFO "PM: Creating hibernation image: \n"); 1204 printk(KERN_INFO "PM: Creating hibernation image: \n");
1205 1205
1206 drain_local_pages(); 1206 drain_local_pages(NULL);
1207 nr_pages = count_data_pages(); 1207 nr_pages = count_data_pages();
1208 nr_highmem = count_highmem_pages(); 1208 nr_highmem = count_highmem_pages();
1209 printk(KERN_INFO "PM: Need to copy %u pages\n", nr_pages + nr_highmem); 1209 printk(KERN_INFO "PM: Need to copy %u pages\n", nr_pages + nr_highmem);
@@ -1221,7 +1221,7 @@ asmlinkage int swsusp_save(void)
1221 /* During allocating of suspend pagedir, new cold pages may appear. 1221 /* During allocating of suspend pagedir, new cold pages may appear.
1222 * Kill them. 1222 * Kill them.
1223 */ 1223 */
1224 drain_local_pages(); 1224 drain_local_pages(NULL);
1225 copy_data_pages(&copy_bm, &orig_bm); 1225 copy_data_pages(&copy_bm, &orig_bm);
1226 1226
1227 /* 1227 /*