aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux-foundation.org>2010-01-05 01:34:51 -0500
committerTejun Heo <tj@kernel.org>2010-01-05 01:34:51 -0500
commit99dcc3e5a94ed491fbef402831d8c0bbb267f995 (patch)
treedd4d2b9e10ab0d4502e4b2a22dfc0a02a3300d7e /include/linux/mm.h
parent5917dae83cb02dfe74c9167b79e86e6d65183fa3 (diff)
this_cpu: Page allocator conversion
Use the per cpu allocator functionality to avoid per cpu arrays in struct zone. This drastically reduces the size of struct zone for systems with large amounts of processors and allows placement of critical variables of struct zone in one cacheline even on very large systems. Another effect is that the pagesets of one processor are placed near one another. If multiple pagesets from different zones fit into one cacheline then additional cacheline fetches can be avoided on the hot paths when allocating memory from multiple zones. Bootstrap becomes simpler if we use the same scheme for UP, SMP, NUMA. #ifdefs are reduced and we can drop the zone_pcp macro. Hotplug handling is also simplified since cpu alloc can bring up and shut down cpu areas for a specific cpu as a whole. So there is no need to allocate or free individual pagesets. V7-V8: - Explain chicken egg dilemmna with percpu allocator. V4-V5: - Fix up cases where per_cpu_ptr is called before irq disable - Integrate the bootstrap logic that was separate before. tj: Build failure in pageset_cpuup_callback() due to missing ret variable fixed. Reviewed-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 2265f28eb47a..554fa395aac9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1079,11 +1079,7 @@ extern void si_meminfo(struct sysinfo * val);
1079extern void si_meminfo_node(struct sysinfo *val, int nid); 1079extern void si_meminfo_node(struct sysinfo *val, int nid);
1080extern int after_bootmem; 1080extern int after_bootmem;
1081 1081
1082#ifdef CONFIG_NUMA
1083extern void setup_per_cpu_pageset(void); 1082extern void setup_per_cpu_pageset(void);
1084#else
1085static inline void setup_per_cpu_pageset(void) {}
1086#endif
1087 1083
1088extern void zone_pcp_update(struct zone *zone); 1084extern void zone_pcp_update(struct zone *zone);
1089 1085