summaryrefslogtreecommitdiff
path: root/kernel/torture.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-06-17 01:38:24 +0300
committerPaul E. McKenney <paulmck@kernel.org>2020-06-29 22:01:45 +0300
commit2102ad290af06119ccfb56ddc3a0e5011a91537e (patch)
treeda41520758b863ec3b55f07a2de286af320eec08 /kernel/torture.c
parent06efa9b4b27f926eeb8c935f430f8557eb8b106e (diff)
downloadlinux-2102ad290af06119ccfb56ddc3a0e5011a91537e.tar.xz
torture: Dump ftrace at shutdown only if requested
If there is a large number of torture tests running concurrently, all of which are dumping large ftrace buffers at shutdown time, the resulting dumping can take a very long time, particularly on systems with rotating-rust storage. This commit therefore adds a default-off torture.ftrace_dump_at_shutdown module parameter that enables shutdown-time ftrace-buffer dumping. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/torture.c')
-rw-r--r--kernel/torture.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/torture.c b/kernel/torture.c
index a1a41484ff6d..1061492f14bd 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -45,6 +45,9 @@ MODULE_AUTHOR("Paul E. McKenney <paulmck@linux.ibm.com>");
static bool disable_onoff_at_boot;
module_param(disable_onoff_at_boot, bool, 0444);
+static bool ftrace_dump_at_shutdown;
+module_param(ftrace_dump_at_shutdown, bool, 0444);
+
static char *torture_type;
static int verbose;
@@ -527,7 +530,8 @@ static int torture_shutdown(void *arg)
torture_shutdown_hook();
else
VERBOSE_TOROUT_STRING("No torture_shutdown_hook(), skipping.");
- rcu_ftrace_dump(DUMP_ALL);
+ if (ftrace_dump_at_shutdown)
+ rcu_ftrace_dump(DUMP_ALL);
kernel_power_off(); /* Shut down the system. */
return 0;
}