Commit e03bcb68 authored by Milton Miller's avatar Milton Miller Committed by Ingo Molnar

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: default avatarMilton Miller <miltonm@bga.com>
Acked-by: default avatarAnton Blanchard <anton@samba.org>
Acked-by: default avatarJens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: : Nick Piggin <npiggin@suse.de>
LKML-Reference: <20100118020051.GR12666@kryten>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6ccf80eb
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/cpu.h> #include <linux/cpu.h>
static DEFINE_PER_CPU(struct call_single_queue, call_single_queue);
static struct { static struct {
struct list_head queue; struct list_head queue;
raw_spinlock_t lock; raw_spinlock_t lock;
...@@ -33,12 +31,14 @@ struct call_function_data { ...@@ -33,12 +31,14 @@ struct call_function_data {
cpumask_var_t cpumask; cpumask_var_t cpumask;
}; };
static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data);
struct call_single_queue { struct call_single_queue {
struct list_head list; struct list_head list;
raw_spinlock_t lock; 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 static int
hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu) hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
...@@ -256,7 +256,7 @@ void generic_smp_call_function_single_interrupt(void) ...@@ -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 * smp_call_function_single - Run a function on a specific CPU
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment