[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-e03bcb68629c7f0728c95f1afe06ce48565c7713@git.kernel.org>
Date: Tue, 19 Jan 2010 14:22:54 GMT
From: tip-bot for Milton Miller <miltonm@....com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, anton@...ba.org, hpa@...or.com,
mingo@...hat.com, torvalds@...ux-foundation.org,
peterz@...radead.org, miltonm@....com, jens.axboe@...cle.com,
npiggin@...e.de, akpm@...ux-foundation.org, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:core/ipi] generic-ipi: Optimize accesses by using DEFINE_PER_CPU_SHARED_ALIGNED for IPI data
Commit-ID: e03bcb68629c7f0728c95f1afe06ce48565c7713
Gitweb: http://git.kernel.org/tip/e03bcb68629c7f0728c95f1afe06ce48565c7713
Author: Milton Miller <miltonm@....com>
AuthorDate: Mon, 18 Jan 2010 13:00:51 +1100
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Mon, 18 Jan 2010 09:02:59 +0100
generic-ipi: Optimize accesses by using DEFINE_PER_CPU_SHARED_ALIGNED for IPI data
The smp ipi data is passed around and given write access by
other cpus and should be separated from per-cpu data consumed by
this cpu.
Looking for hot lines, I saw call_function_data shared with
tick_cpu_sched.
Signed-off-by: Milton Miller <miltonm@....com>
Acked-by: Anton Blanchard <anton@...ba.org>
Acked-by: Jens Axboe <jens.axboe@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: : Nick Piggin <npiggin@...e.de>
LKML-Reference: <20100118020051.GR12666@...ten>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/smp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index f104084..9867b6b 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -12,8 +12,6 @@
#include <linux/smp.h>
#include <linux/cpu.h>
-static DEFINE_PER_CPU(struct call_single_queue, call_single_queue);
-
static struct {
struct list_head queue;
raw_spinlock_t lock;
@@ -33,12 +31,14 @@ struct call_function_data {
cpumask_var_t cpumask;
};
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data);
+
struct call_single_queue {
struct list_head list;
raw_spinlock_t lock;
};
-static DEFINE_PER_CPU(struct call_function_data, cfd_data);
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_single_queue, call_single_queue);
static int
hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
@@ -256,7 +256,7 @@ void generic_smp_call_function_single_interrupt(void)
}
}
-static DEFINE_PER_CPU(struct call_single_data, csd_data);
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_single_data, csd_data);
/*
* smp_call_function_single - Run a function on a specific CPU
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists