Skip to content

Commit 2102ad2

Browse files
committed
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 <[email protected]>
1 parent 06efa9b commit 2102ad2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5096,6 +5096,13 @@
50965096
Prevent the CPU-hotplug component of torturing
50975097
until after init has spawned.
50985098

5099+
torture.ftrace_dump_at_shutdown= [KNL]
5100+
Dump the ftrace buffer at torture-test shutdown,
5101+
even if there were no errors. This can be a
5102+
very costly operation when many torture tests
5103+
are running concurrently, especially on systems
5104+
with rotating-rust storage.
5105+
50995106
tp720= [HW,PS2]
51005107

51015108
tpm_suspend_pcr=[HW,TPM]

kernel/torture.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ MODULE_AUTHOR("Paul E. McKenney <[email protected]>");
4545
static bool disable_onoff_at_boot;
4646
module_param(disable_onoff_at_boot, bool, 0444);
4747

48+
static bool ftrace_dump_at_shutdown;
49+
module_param(ftrace_dump_at_shutdown, bool, 0444);
50+
4851
static char *torture_type;
4952
static int verbose;
5053

@@ -527,7 +530,8 @@ static int torture_shutdown(void *arg)
527530
torture_shutdown_hook();
528531
else
529532
VERBOSE_TOROUT_STRING("No torture_shutdown_hook(), skipping.");
530-
rcu_ftrace_dump(DUMP_ALL);
533+
if (ftrace_dump_at_shutdown)
534+
rcu_ftrace_dump(DUMP_ALL);
531535
kernel_power_off(); /* Shut down the system. */
532536
return 0;
533537
}

0 commit comments

Comments
 (0)