diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-02-05 01:29:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:17 -0500 |
commit | 9f8f2172537de7af0b0fbd33502d18d52b1339bc (patch) | |
tree | 273c86583ed0295059c5526d3bd6927520a20add /include | |
parent | e2848a0efedef4dad52d1334d37f8719cd6268fd (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 'include')
-rw-r--r-- | include/linux/gfp.h | 2 | ||||
-rw-r--r-- | include/linux/suspend.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 7e93a9ae7064..0c6ce515185d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -228,5 +228,7 @@ extern void FASTCALL(free_cold_page(struct page *page)); | |||
228 | 228 | ||
229 | void page_alloc_init(void); | 229 | void page_alloc_init(void); |
230 | void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); | 230 | void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); |
231 | void drain_all_pages(void); | ||
232 | void drain_local_pages(void *dummy); | ||
231 | 233 | ||
232 | #endif /* __LINUX_GFP_H */ | 234 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 646ce2d068d4..1d7d4c5797ee 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -130,7 +130,6 @@ struct pbe { | |||
130 | }; | 130 | }; |
131 | 131 | ||
132 | /* mm/page_alloc.c */ | 132 | /* mm/page_alloc.c */ |
133 | extern void drain_local_pages(void); | ||
134 | extern void mark_free_pages(struct zone *zone); | 133 | extern void mark_free_pages(struct zone *zone); |
135 | 134 | ||
136 | /** | 135 | /** |