Commit 8b969c53 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] move apic_timer_irqs to irqstat

This patch from Ravikiran G Thirumalai removes
cacheline bouncing of apic_timer_irqs
parent bc3c34ef
...@@ -1057,7 +1057,6 @@ inline void smp_local_timer_interrupt(struct pt_regs * regs) ...@@ -1057,7 +1057,6 @@ inline void smp_local_timer_interrupt(struct pt_regs * regs)
* [ if a single-CPU system runs an SMP kernel then we call the local * [ if a single-CPU system runs an SMP kernel then we call the local
* interrupt as well. Thus we cannot inline the local irq ... ] * interrupt as well. Thus we cannot inline the local irq ... ]
*/ */
unsigned int apic_timer_irqs [NR_CPUS];
void smp_apic_timer_interrupt(struct pt_regs regs) void smp_apic_timer_interrupt(struct pt_regs regs)
{ {
...@@ -1066,7 +1065,7 @@ void smp_apic_timer_interrupt(struct pt_regs regs) ...@@ -1066,7 +1065,7 @@ void smp_apic_timer_interrupt(struct pt_regs regs)
/* /*
* the NMI deadlock-detector uses this. * the NMI deadlock-detector uses this.
*/ */
apic_timer_irqs[cpu]++; irq_stat[cpu].apic_timer_irqs++;
/* /*
* NOTE! We'd better ACK the irq immediately, * NOTE! We'd better ACK the irq immediately,
......
...@@ -171,7 +171,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -171,7 +171,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, "LOC: "); seq_printf(p, "LOC: ");
for (j = 0; j < NR_CPUS; j++) for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j)) if (cpu_online(j))
p += seq_printf(p, "%10u ", apic_timer_irqs[j]); p += seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
seq_putc(p, '\n'); seq_putc(p, '\n');
#endif #endif
seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
......
...@@ -348,7 +348,7 @@ void nmi_watchdog_tick (struct pt_regs * regs) ...@@ -348,7 +348,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
*/ */
int sum, cpu = smp_processor_id(); int sum, cpu = smp_processor_id();
sum = apic_timer_irqs[cpu]; sum = irq_stat[cpu].apic_timer_irqs;
if (last_irq_sums[cpu] == sum) { if (last_irq_sums[cpu] == sum) {
/* /*
......
...@@ -87,7 +87,6 @@ extern void enable_APIC_timer(void); ...@@ -87,7 +87,6 @@ extern void enable_APIC_timer(void);
extern struct pm_dev *apic_pm_register(pm_dev_t, unsigned long, pm_callback); extern struct pm_dev *apic_pm_register(pm_dev_t, unsigned long, pm_callback);
extern void apic_pm_unregister(struct pm_dev*); extern void apic_pm_unregister(struct pm_dev*);
extern unsigned int apic_timer_irqs [NR_CPUS];
extern int check_nmi_watchdog (void); extern int check_nmi_watchdog (void);
extern void enable_NMI_through_LVT0 (void * dummy); extern void enable_NMI_through_LVT0 (void * dummy);
......
...@@ -12,6 +12,7 @@ typedef struct { ...@@ -12,6 +12,7 @@ typedef struct {
struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
unsigned long idle_timestamp; unsigned long idle_timestamp;
unsigned int __nmi_count; /* arch dependent */ unsigned int __nmi_count; /* arch dependent */
unsigned int apic_timer_irqs; /* arch dependent */
} ____cacheline_aligned irq_cpustat_t; } ____cacheline_aligned irq_cpustat_t;
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
- Tasklets: serialized wrt itself. - Tasklets: serialized wrt itself.
*/ */
irq_cpustat_t irq_stat[NR_CPUS]; irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
static struct softirq_action softirq_vec[32] __cacheline_aligned_in_smp; static struct softirq_action softirq_vec[32] __cacheline_aligned_in_smp;
......
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