[Devel] [PATCH RH9] irq/proc: add cond_resched to show_interrupts
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri Jun 21 10:45:47 MSK 2024
This should decrease the possibility to trigger soft-lockup in
show_interrupts(). E.g. in case waiting for irq_desc->lock spinlock adds
up across several iterations over irqs to more than 2*watchdog_thresh.
https://pmc.acronis.work/browse/VSTOR-88194
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
kernel/irq/proc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 623b8136e9af..7b4c8ff02e57 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -533,6 +533,8 @@ int show_interrupts(struct seq_file *p, void *v)
raw_spin_unlock_irqrestore(&desc->lock, flags);
outsparse:
rcu_read_unlock();
+
+ cond_resched();
return 0;
}
#endif
--
2.45.2
More information about the Devel
mailing list