lkml.org 
[lkml]   [2009]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[this_cpu_xx V4 14/20] this_cpu ops: Remove pageset_notifier
Remove the pageset notifier since it only marks that a processor
exists on a specific node. Move that code into the vmstat notifier.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>

---
mm/page_alloc.c | 27 ---------------------------
mm/vmstat.c | 1 +
2 files changed, 1 insertion(+), 27 deletions(-)
Index: linux-2.6/mm/vmstat.c
===================================================================
--- linux-2.6.orig/mm/vmstat.c 2009-09-29 09:02:29.000000000 -0500
+++ linux-2.6/mm/vmstat.c 2009-09-29 09:04:18.000000000 -0500
@@ -906,6 +906,7 @@ static int __cpuinit vmstat_cpuup_callba
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
start_cpu_timer(cpu);
+ node_set_state(cpu_to_node(cpu), N_CPU);
break;
case CPU_DOWN_PREPARE:
case CPU_DOWN_PREPARE_FROZEN:
Index: linux-2.6/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c 2009-09-29 09:04:16.000000000 -0500
+++ linux-2.6/mm/page_alloc.c 2009-09-29 09:04:18.000000000 -0500
@@ -3097,26 +3097,6 @@ static void setup_pagelist_highmark(stru
*/
static DEFINE_PER_CPU(struct per_cpu_pageset, boot_pageset);

-static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb,
- unsigned long action,
- void *hcpu)
-{
- int cpu = (long)hcpu;
-
- switch (action) {
- case CPU_UP_PREPARE:
- case CPU_UP_PREPARE_FROZEN:
- node_set_state(cpu_to_node(cpu), N_CPU);
- break;
- default:
- break;
- }
- return NOTIFY_OK;
-}
-
-static struct notifier_block __cpuinitdata pageset_notifier =
- { &pageset_cpuup_callback, NULL, 0 };
-
/*
* Allocate per cpu pagesets and initialize them.
* Before this call only boot pagesets were available.
@@ -3141,13 +3121,6 @@ void __init setup_per_cpu_pageset(void)
percpu_pagelist_fraction));
}
}
-
- /*
- * The boot cpu is always the first active.
- * The boot node has a processor
- */
- node_set_state(cpu_to_node(smp_processor_id()), N_CPU);
- register_cpu_notifier(&pageset_notifier);
}

static noinline __init_refok
--


\
 
 \ /
  Last update: 2009-10-01 23:33    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site