Commit 2102ad29 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

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: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 06efa9b4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5096,6 +5096,13 @@
			Prevent the CPU-hotplug component of torturing
			until after init has spawned.

	torture.ftrace_dump_at_shutdown= [KNL]
			Dump the ftrace buffer at torture-test shutdown,
			even if there were no errors.  This can be a
			very costly operation when many torture tests
			are running concurrently, especially on systems
			with rotating-rust storage.

	tp720=		[HW,PS2]

	tpm_suspend_pcr=[HW,TPM]
+5 −1
Original line number Diff line number Diff line
@@ -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,6 +530,7 @@ static int torture_shutdown(void *arg)
		torture_shutdown_hook();
	else
		VERBOSE_TOROUT_STRING("No torture_shutdown_hook(), skipping.");
	if (ftrace_dump_at_shutdown)
		rcu_ftrace_dump(DUMP_ALL);
	kernel_power_off();	/* Shut down the system. */
	return 0;