]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
genirq: Move clear of kstat_irqs to free_desc()
authorLuigi Rizzo <lrizzo@google.com>
Mon, 12 Jan 2026 08:32:33 +0000 (08:32 +0000)
committerThomas Gleixner <tglx@kernel.org>
Tue, 13 Jan 2026 09:16:29 +0000 (10:16 +0100)
commitfb11a2493e685d0b733c2346f5b26f2e372584fb
tree03f62212f1cfd1a9e14faab33187089ac1d250f0
parentaef30c8d569c0f31715447525640044c74feb26f
genirq: Move clear of kstat_irqs to free_desc()

desc_set_defaults() has a loop to clear the per-cpu counters kstats_irq.

This is only needed in free_desc(), which is used with non-sparse IRQs so
that the interrupt descriptor can be recycled. For newly allocated
descriptors, the memory comes from alloc_percpu() and is already zeroed
out.

Move the loop to free_desc() to avoid wasting time unnecessarily.

Signed-off-by: Luigi Rizzo <lrizzo@google.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260112083234.2665832-1-lrizzo@google.com
kernel/irq/irqdesc.c