aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/torture.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-11-25 13:00:04 -0800
committerPaul E. McKenney <paulmck@kernel.org>2021-01-06 17:17:21 -0800
commit8a67a20bf257ca378d6e5588fbe4382966395ac8 (patch)
tree753181be97fe8ba219ee3ece337ad440648e27e2 /include/linux/torture.h
parenttorture: Make refscale throttle high-rate printk()s (diff)
downloadlinux-dev-8a67a20bf257ca378d6e5588fbe4382966395ac8.tar.xz
linux-dev-8a67a20bf257ca378d6e5588fbe4382966395ac8.zip
torture: Throttle VERBOSE_TOROUT_*() output
This commit adds kernel boot parameters torture.verbose_sleep_frequency and torture.verbose_sleep_duration, which allow VERBOSE_TOROUT_*() output to be throttled with periodic sleeps on large systems. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/torture.h')
-rw-r--r--include/linux/torture.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h
index 32941f8106b2..d62d13c8c69a 100644
--- a/include/linux/torture.h
+++ b/include/linux/torture.h
@@ -32,9 +32,20 @@
#define TOROUT_STRING(s) \
pr_alert("%s" TORTURE_FLAG " %s\n", torture_type, s)
#define VERBOSE_TOROUT_STRING(s) \
- do { if (verbose) pr_alert("%s" TORTURE_FLAG " %s\n", torture_type, s); } while (0)
+do { \
+ if (verbose) { \
+ verbose_torout_sleep(); \
+ pr_alert("%s" TORTURE_FLAG " %s\n", torture_type, s); \
+ } \
+} while (0)
#define VERBOSE_TOROUT_ERRSTRING(s) \
- do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! %s\n", torture_type, s); } while (0)
+do { \
+ if (verbose) { \
+ verbose_torout_sleep(); \
+ pr_alert("%s" TORTURE_FLAG "!!! %s\n", torture_type, s); \
+ } \
+} while (0)
+void verbose_torout_sleep(void);
/* Definitions for online/offline exerciser. */
typedef void torture_ofl_func(void);