irq: Better struct irqaction layout

We currently use kmalloc-96 slab for struct irqaction allocations on
64bit arches.

This is unfortunate because of possible false sharing and two cache
lines accesses.

Move 'name' and 'dir' fields at the end of the structure, and force a
suitable alignement.

Hot path fields now use one cache line on x86_64.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1288865628.2659.69.camel@edumazet-laptop>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by Eric Dumazet and committed by Thomas Gleixner f6cd2477 814ce252

+3 -3
+3 -3
include/linux/interrupt.h
··· 114 struct irqaction { 115 irq_handler_t handler; 116 unsigned long flags; 117 - const char *name; 118 void *dev_id; 119 struct irqaction *next; 120 int irq; 121 - struct proc_dir_entry *dir; 122 irq_handler_t thread_fn; 123 struct task_struct *thread; 124 unsigned long thread_flags; 125 - }; 126 127 extern irqreturn_t no_action(int cpl, void *dev_id); 128
··· 114 struct irqaction { 115 irq_handler_t handler; 116 unsigned long flags; 117 void *dev_id; 118 struct irqaction *next; 119 int irq; 120 irq_handler_t thread_fn; 121 struct task_struct *thread; 122 unsigned long thread_flags; 123 + const char *name; 124 + struct proc_dir_entry *dir; 125 + } ____cacheline_internodealigned_in_smp; 126 127 extern irqreturn_t no_action(int cpl, void *dev_id); 128