--- include/linux/mm.h | 4 ---- include/linux/mmzone.h | 14 -------------- mm/page_alloc.c | 10 ++++------ 3 files changed, 4 insertions(+), 24 deletions(-) Index: linux-2.6/mm/page_alloc.c =================================================================== --- linux-2.6.orig/mm/page_alloc.c 2007-11-02 21:12:41.000000000 -0700 +++ linux-2.6/mm/page_alloc.c 2007-11-02 21:18:03.000000000 -0700 @@ -2640,7 +2640,6 @@ static void setup_pagelist_highmark(stru pcp->batch = PAGE_SHIFT * 8; } -#ifdef CONFIG_SMP /* * Dynamically allocate memory for the per cpu pageset array in struct zone. */ @@ -2665,6 +2664,7 @@ static void __cpuinit process_zones(int } } +#ifdef CONFIG_SMP static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) @@ -2685,6 +2685,7 @@ static int __cpuinit pageset_cpuup_callb static struct notifier_block __cpuinitdata pageset_notifier = { &pageset_cpuup_callback, NULL, 0 }; +#endif void __init setup_per_cpu_pageset(void) { @@ -2708,9 +2709,10 @@ void __init setup_per_cpu_pageset(void) BUG_ON(!zone->pageset); } process_zones(smp_processor_id()); +#ifdef CONFIG_SMP register_cpu_notifier(&pageset_notifier); -} #endif +} static noinline __init_refok int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) @@ -2757,7 +2759,6 @@ int zone_wait_table_init(struct zone *zo static __meminit void zone_pcp_init(struct zone *zone) { -#ifdef CONFIG_SMP static struct per_cpu_pageset boot_pageset; /* @@ -2778,9 +2779,6 @@ static __meminit void zone_pcp_init(stru */ zone->pageset = &boot_pageset - THIS_CPU_OFFSET; setup_pageset(&boot_pageset, 0); -#else - setup_pageset(zone_pcp(zone, 0), zone_batchsize(zone)); -#endif if (zone->present_pages) printk(KERN_DEBUG " %s zone: %lu pages, LIFO batch:%u\n", zone->name, zone->present_pages, Index: linux-2.6/include/linux/mmzone.h =================================================================== --- linux-2.6.orig/include/linux/mmzone.h 2007-11-02 21:12:25.000000000 -0700 +++ linux-2.6/include/linux/mmzone.h 2007-11-02 21:21:02.000000000 -0700 @@ -123,13 +123,8 @@ struct per_cpu_pageset { #endif }; -#ifdef CONFIG_SMP #define zone_pcp(__z, __cpu) CPU_PTR((__z)->pageset, (__cpu)) #define this_pcp(__z) THIS_CPU_PTR((__z)->pageset) -#else -#define zone_pcp(__z, __cpu) (&(__z)->pageset) -#define this_pcp(__z) (&(__z)->pageset) -#endif enum zone_type { #ifdef CONFIG_ZONE_DMA @@ -234,16 +229,7 @@ struct zone { unsigned long min_unmapped_pages; unsigned long min_slab_pages; #endif -#ifdef CONFIG_SMP struct per_cpu_pageset *pageset; -#else - /* - * Fallback for CPU_ALLOC is to use slab which cannot - * be used that early in boot. So we must include - * the pageset here. - */ - struct per_cpu_pageset pageset; -#endif /* * free areas of different sizes */ Index: linux-2.6/include/linux/mm.h =================================================================== --- linux-2.6.orig/include/linux/mm.h 2007-11-02 21:23:23.000000000 -0700 +++ linux-2.6/include/linux/mm.h 2007-11-02 21:23:39.000000000 -0700 @@ -931,11 +931,7 @@ extern void show_mem(void); extern void si_meminfo(struct sysinfo * val); extern void si_meminfo_node(struct sysinfo *val, int nid); -#ifdef CONFIG_SMP extern void setup_per_cpu_pageset(void); -#else -static inline void setup_per_cpu_pageset(void) {} -#endif /* prio_tree.c */ void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);