]> www.infradead.org Git - users/willy/xarray.git/commit
locking/csd-lock: Use backoff for repeated reports of same incident
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 2 Jul 2024 21:32:20 +0000 (14:32 -0700)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Wed, 14 Aug 2024 18:36:48 +0000 (00:06 +0530)
commitd40760d6811d55172ba6b90ebd2a60a75f88bffe
treef38caff6012e31503dde8a023c382ac555c4cd4d
parentac9d45544cd571decca395715d0b0a3b617d02f4
locking/csd-lock: Use backoff for repeated reports of same incident

Currently, the CSD-lock diagnostics in CONFIG_CSD_LOCK_WAIT_DEBUG=y
kernels are emitted at five-second intervals.  Although this has proven
to be a good time interval for the first diagnostic, if the target CPU
keeps interrupts disabled for way longer than five seconds, the ratio
of useful new information to pointless repetition increases considerably.

Therefore, back off the time period for repeated reports of the same
incident, increasing linearly with the number of reports and logarithmicly
with the number of online CPUs.

[ paulmck: Apply Dan Carpenter feedback. ]

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Imran Khan <imran.f.khan@oracle.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Leonardo Bras <leobras@redhat.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Reviewed-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
kernel/smp.c