Messages in this thread | | | Date | Mon, 6 Oct 2014 10:06:58 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: Why do we still have 32 bit counters? Interrupt counters overflow within 50 days |
| |
On Sun, 5 Oct 2014, Christoph Lameter wrote: > -DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1; > +DEFINE_PER_CPU(u64, irq_count) __visible = -1;
What's the point of this? irq_count is solely used to figure out whether interrupts are nested, i.e. whether we need to switch the stack on x86_64 or not. See the usage sites in arch/x86/kernel/entry_64.S
> @@ -51,7 +51,7 @@ struct irq_desc { > unsigned int core_internal_state__do_not_mess_with_it; > unsigned int depth; /* nested irq disables */ > unsigned int wake_depth; /* nested wake enables */ > - unsigned int irq_count; /* For detecting broken IRQs */ > + u64 irq_count; /* For detecting broken IRQs */
This is pointless as this count is solely used for the spurious detector and reset to 0 when irq_count reaches 100000. See note_interrupt().
> -extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); > +extern u64 kstat_irqs_cpu(unsigned int irq, int cpu);
Care to fixup the other call sites of this as well? git grep is your friend.
Thanks,
tglx
| |