Commit f6cd24777513fcc673d432cc29ef59881d3e4df1
Committed by
Thomas Gleixner
1 parent
814ce25211
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
include/linux/interrupt.h
... | ... | @@ -114,15 +114,15 @@ |
114 | 114 | struct irqaction { |
115 | 115 | irq_handler_t handler; |
116 | 116 | unsigned long flags; |
117 | - const char *name; | |
118 | 117 | void *dev_id; |
119 | 118 | struct irqaction *next; |
120 | 119 | int irq; |
121 | - struct proc_dir_entry *dir; | |
122 | 120 | irq_handler_t thread_fn; |
123 | 121 | struct task_struct *thread; |
124 | 122 | unsigned long thread_flags; |
125 | -}; | |
123 | + const char *name; | |
124 | + struct proc_dir_entry *dir; | |
125 | +} ____cacheline_internodealigned_in_smp; | |
126 | 126 | |
127 | 127 | extern irqreturn_t no_action(int cpl, void *dev_id); |
128 | 128 |