Re: [PATCH v2] genirq: move clear of kstat_irqs to free_desc()

From: Thomas Gleixner

Date: Tue Jan 13 2026 - 04:09:46 EST


On Mon, Jan 12 2026 at 21:18, Eric Dumazet wrote:
>> - scoped_guard(raw_spinlock_irqsave, &desc->lock)
>> + scoped_guard(raw_spinlock_irqsave, &desc->lock) {
>> desc_set_defaults(irq, desc, irq_desc_get_node(desc), NULL, NULL);
>> + for_each_possible_cpu(cpu)
>> + *per_cpu_ptr(desc->kstat_irqs, cpu) = (struct irqstat) { };
>> + }
>
>
> It seems that for_each_possible_cpu(cpu) could be done outside of the
> desc->lock protection.
>
> This would shorten hard-irq blocking by N cache line misses.

Right, though it really does not matter unless you deeply care about:

alpha, arc, hexagon, m68k, mips, parisc, sparc, xtensa and random old
ARM32 platforms :)