[Devel] [PATCH RHEL9 COMMIT] irq/proc: add cond_resched to show_interrupts
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jun 25 20:35:07 MSK 2024
The commit is pushed to "branch-rh9-5.14.0-425.vz9.60.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-425.vz9.60.7
------>
commit 1522f5e1677db9b1bbfdc1ca7daa04979f6d71be
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date: Fri Jun 21 15:45:47 2024 +0800
irq/proc: add cond_resched to show_interrupts
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
More information about the Devel
mailing list