Messages in this thread | | | From | "Zhang Xincheng" <> | Subject | Re: [PATCH] interrupt: discover and disable very frequent interrupts | Date | Sun, 9 Oct 2022 09:31:36 +0800 |
| |
> Again: what makes you think that it is better to kill the interrupt > than suffering a RCU stall? Yes, that's a lot of interrupts. But > killing it and risking the whole system isn't an acceptable outcome.
It's really not good to kill interrupts directly. Perhaps a better way is to report it and let the system administrator decide what to do with it.
+ if((desc->gap_count & 0xffff0000) == 0) + desc->gap_time = get_jiffies_64(); + + desc->gap_count ++; + + if((desc->gap_count & 0x0000ffff) >= 2000) { + if((get_jiffies_64() - desc->gap_time) < HZ) { + desc->gap_count += 0x00010000; + desc->gap_count &= 0xffff0000; + } else { + desc->gap_count = 0; + } + + if((desc->gap_count >> 16) > 30) { + __report_bad_irq(desc, action_ret, KERN_ERR "irq %d: triggered too frequently\n"); + } + } +
Thanks,
Zhang Xincheng | |