[tip: core/rcu] torture: Make refscale throttle high-rate printk()s

From: tip-bot2 for Paul E. McKenney
Date: Fri Feb 12 2021 - 07:48:47 EST


The following commit has been merged into the core/rcu branch of tip:

Commit-ID: 414c116e016584137118067f506125f6ace6128c
Gitweb: https://git.kernel.org/tip/414c116e016584137118067f506125f6ace6128c
Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
AuthorDate: Wed, 25 Nov 2020 10:50:35 -08:00
Committer: Paul E. McKenney <paulmck@xxxxxxxxxx>
CommitterDate: Wed, 06 Jan 2021 17:17:20 -08:00

torture: Make refscale throttle high-rate printk()s

This commit adds a short delay for verbose_batched-throttled printk()s
to further decrease console flooding.

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
---
kernel/rcu/refscale.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index 3da246f..02dd976 100644
--- a/kernel/rcu/refscale.c
+++ b/kernel/rcu/refscale.c
@@ -52,8 +52,10 @@ static atomic_t verbose_batch_ctr;
do { \
if (verbose && \
(verbose_batched <= 0 || \
- !(atomic_inc_return(&verbose_batch_ctr) % verbose_batched))) \
+ !(atomic_inc_return(&verbose_batch_ctr) % verbose_batched))) { \
+ schedule_timeout_uninterruptible(1); \
pr_alert("%s" SCALE_FLAG s, scale_type, ## x); \
+ } \
} while (0)

#define VERBOSE_SCALEOUT_ERRSTRING(s, x...) \