summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-02-18 04:47:20 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-02-18 04:47:20 -0800
commit35651c8cc709a1f2c0afacb86c5b610d77c41d9e (patch)
tree4dec5f4e3b05b881f49ae7c829e5afa29f9b8a82 /kernel
parent933ba10234f68f44af3a72afb3c0810b082c5a0e (diff)
[PATCH] Remove kstat cpu notifiers
From: Rusty Russell <rusty@rustcorp.com.au> Some well-meaning person put a notifier in for CPUs to update the kstat structures in sched.c. However, it does nothing, and even with the full hotplug CPU patch, it still does nothing. Simple counters very rarely need anything done when CPUs come up or go down. If you have per-cpu caches, or per-cpu threads, you need to do something. But very rarely for stats.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index ce0aefdcbf34..f969e945060e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2850,45 +2850,11 @@ __init int migration_init(void)
spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
EXPORT_SYMBOL(kernel_flag);
-static void kstat_init_cpu(int cpu)
-{
- /* Add any initialisation to kstat here */
- /* Useful when cpu offlining logic is added.. */
-}
-
-static int __devinit kstat_cpu_notify(struct notifier_block *self,
- unsigned long action, void *hcpu)
-{
- int cpu = (unsigned long)hcpu;
- switch(action) {
- case CPU_UP_PREPARE:
- kstat_init_cpu(cpu);
- break;
- default:
- break;
- }
- return NOTIFY_OK;
-}
-
-static struct notifier_block __devinitdata kstat_nb = {
- .notifier_call = kstat_cpu_notify,
- .next = NULL,
-};
-
-__init static void init_kstat(void)
-{
- kstat_cpu_notify(&kstat_nb, (unsigned long)CPU_UP_PREPARE,
- (void *)(long)smp_processor_id());
- register_cpu_notifier(&kstat_nb);
-}
-
void __init sched_init(void)
{
runqueue_t *rq;
int i, j, k;
- /* Init the kstat counters */
- init_kstat();
for (i = 0; i < NR_CPUS; i++) {
prio_array_t *array;