aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqdesc.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-01-13 18:45:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 20:32:31 -0500
commit6c9ae009b298753a3baf71298d676a68b5a10c8f (patch)
tree95a7e4ca54fe8e96c95cedd4e8d6450659015212 /include/linux/irqdesc.h
parent558bbb2fc75fd9676e07e347c021865e326c56db (diff)
irq: use per_cpu kstat_irqs
Use modern per_cpu API to increment {soft|hard}irq counters, and use per_cpu allocation for (struct irq_desc)->kstats_irq instead of an array. This gives better SMP/NUMA locality and saves few instructions per irq. With small nr_cpuids values (8 for example), kstats_irq was a small array (less than L1_CACHE_BYTES), potentially source of false sharing. In the !CONFIG_SPARSE_IRQ case, remove the huge, NUMA/cache unfriendly kstat_irqs_all[NR_IRQS][NR_CPUS] array. Note: we still populate kstats_irq for all possible irqs in early_irq_init(). We probably could use on-demand allocations. (Code included in alloc_descs()). Problem is not all IRQS are used with a prior alloc_descs() call. kstat_irqs_this_cpu() is not used anymore, remove it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Christoph Lameter <cl@linux.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <andi@firstfloor.org> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r--include/linux/irqdesc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 979c68cc7458..6a64c6fa81af 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -57,7 +57,7 @@ struct irq_desc {
57#endif 57#endif
58 58
59 struct timer_rand_state *timer_rand_state; 59 struct timer_rand_state *timer_rand_state;
60 unsigned int *kstat_irqs; 60 unsigned int __percpu *kstat_irqs;
61 irq_flow_handler_t handle_irq; 61 irq_flow_handler_t handle_irq;
62 struct irqaction *action; /* IRQ action list */ 62 struct irqaction *action; /* IRQ action list */
63 unsigned int status; /* IRQ status */ 63 unsigned int status; /* IRQ status */