2023-07-17 19:01:38

by Paul E. McKenney

[permalink] [raw]
Subject: [PATCH csd-lock] Decrease console output from CSD-lock timeouts for v6.6

Hello!

This series contains a couple of patches that reduce the console output
produced by CSD-lock timeouts.

1. Reduce logging due to dump_stack of CSD waiters, courtesy of
Imran Khan.

2. Reduce NMI traffic from CSD waiters to CSD destination, courtesy
of Imran Khan.

Thanx, Paul

------------------------------------------------------------------------

b/kernel/smp.c | 3 ++-
kernel/smp.c | 10 +++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)


2023-07-17 19:06:05

by Paul E. McKenney

[permalink] [raw]
Subject: [PATCH csd-lock 1/2] smp: Reduce logging due to dump_stack of CSD waiters

From: Imran Khan <[email protected]>

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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Valentin Schneider <[email protected]>
Cc: Yury Norov <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
---
kernel/smp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index 385179dae360..1d41a0cb54f1 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;
--
2.40.1