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 <ptikhomi...@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

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to