From: Imran Khan Date: Mon, 8 May 2023 22:31:23 +0000 (+1000) Subject: smp: Reduce logging due to dump_stack of CSD waiters X-Git-Tag: v6.6.17~4137^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bd00f6db012f75b42434d39b7fec98b95c1afcc;p=platform%2Fkernel%2Flinux-rpi.git smp: Reduce logging due to dump_stack of CSD waiters If a waiter is waiting for CSD lock, its call stack will not change between first and subsequent hang detection for the same CSD lock. Therefore, do dump_stack only for first-time detection for a given waiter. This avoids excessive logging on systems with hundreds of CPUs where repetitive dump_stack from hundreds of CPUs would otherwise flood the console. Signed-off-by: Imran Khan Cc: Peter Zijlstra Cc: Juergen Gross Cc: Valentin Schneider Cc: Yury Norov Signed-off-by: Paul E. McKenney --- diff --git a/kernel/smp.c b/kernel/smp.c index 385179d..1d41a0c 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -259,7 +259,8 @@ static bool csd_lock_wait_toolong(struct __call_single_data *csd, u64 ts0, u64 * arch_send_call_function_single_ipi(cpu); } } - dump_stack(); + if (firsttime) + dump_stack(); *ts1 = ts2; return false;