genirq: Fix irqs_unhandled in note_interrupt
PATCH 1/1 genirq: Fix irqs_unhandled in note_interrupt
Commit 4f27c00bf80f ("Improve behaviour of spurious IRQ detect") introduced a age of last_unhandled,after irq_count reached 100000, we set irqs_unhandled = 0,but we didn't clear last_unhandled. So we can see the print of irq_spurious_proc_show is not consistent. Like below:
root@jmkernel:~# cat /proc/irq/138/spurious count 99998 unhandled 1 last_unhandled 1543930240 ms
root@jmkernel:~# cat /proc/irq/138/spurious count 0 unhandled 0 last_unhandled 1548915240 ms
we can set last_unhandled=1 as a prompting message.
--- kernel/irq/spurious.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/spurious.c +1 -1
@@ -428,7 +428,7 @@ void note_interrupt(struct irq_desc *desc, irqreturn_t action_ret)mod_timer (&poll_spurious_irq_timer, jiffies +POLL_SPURIOUS_IRQ_INTERVAL ); } - desc->irqs_unhandled =0 ; + desc->irqs_unhandled =1 ; }bool noirqdebug__read_mostly ;
Signature · 1 line
2.34.1
Quoted 3 lines · Angus Chen
Commit
4f27c00bf80f("Improve behaviour of spurious IRQ detect") introduced a age of last_unhandled,afterirq_countreached 100000, we setirqs_unhandled= 0,but we didn't clearlast_unhandled.
We do nothing. Please write changelogs in passive voice.
Quoted 11 lines
So we can see the print of
irq_spurious_proc_showis not consistent. Like below:root@jmkernel:~# cat /proc/irq/138/spurious count 99998 unhandled 1 last_unhandled 1543930240 msroot@jmkernel:~# cat /proc/irq/138/spurious count 0 unhandled 0 last_unhandled 1548915240 ms
I can't figure out what you are trying to demonstrate here.
Quoted 1 line
we can set last_unhandled=1 as a prompting message.
This makes no sense either.
Quoted 10 lines
Signed-off-by Angus Chen <[email protected]>--- kernel/irq/spurious.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/irq/spurious.c +0
-0
kernel/irq/spurious.c void note_interrupt(struct irq_desc *desc, irqreturn_t action_ret) · line 431
Quoted 5 lines
kernel/irq/spurious.c +1
-1@@ -428,7 +428,7 @@ void note_interrupt(struct irq_desc *desc, irqreturn_t action_ret)mod_timer (&poll_spurious_irq_timer, jiffies +POLL_SPURIOUS_IRQ_INTERVAL ); } - desc->irqs_unhandled =0 ; + desc->irqs_unhandled =1 ;
Why? Just to do some incomprehensible /proc/ output cosmetics instead of fixing the related procfs function?
Thanks,
tglx