2 # SPDX-License-Identifier: GPL-2.0+
4 # Run a series of tests under KVM. By default, this series is specified
5 # by the relevant CFLIST file, but can be overridden by the --configs
6 # command-line argument.
8 # Usage: kvm.sh [ options ]
10 # Copyright (C) IBM Corporation, 2011
12 # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
17 T
="`mktemp -d ${TMPDIR-/tmp}/kvm.sh.XXXXXX`"
20 cd `dirname $scriptname`/..
/..
/..
/..
/..
/
22 # This script knows only English.
23 LANG
=en_US.UTF-8
; export LANG
27 RCUTORTURE
="`pwd`/tools/testing/selftests/rcutorture"; export RCUTORTURE
28 PATH
=${RCUTORTURE}/bin
:$PATH; export PATH
31 TORTURE_ALLOTED_CPUS
="`identify_qemu_vcpus`"
32 TORTURE_DEFCONFIG
=defconfig
35 TORTURE_INITRD
="$RCUTORTURE/initrd"; export TORTURE_INITRD
36 TORTURE_KCONFIG_ARG
=""
37 TORTURE_KCONFIG_GDB_ARG
=""
38 TORTURE_BOOT_GDB_ARG
=""
39 TORTURE_QEMU_GDB_ARG
=""
40 TORTURE_JITTER_START
=""
41 TORTURE_JITTER_STOP
=""
42 TORTURE_KCONFIG_KASAN_ARG
=""
43 TORTURE_KCONFIG_KCSAN_ARG
=""
45 TORTURE_NO_AFFINITY
=""
47 torture_qemu_mem_default
=1
49 TORTURE_SHUTDOWN_GRACE
=180
51 TORTURE_MOD
=rcutorture
53 debuginfo
="CONFIG_DEBUG_INFO_NONE=n CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y"
57 ds
=`date +%Y.%m.%d-%H.%M.%S`
61 starttime
="`get_starttime`"
64 echo "Usage: $scriptname optional arguments:"
66 echo " --bootargs kernel-boot-arguments"
67 echo " --bootimage relative-path-to-kernel-boot-image"
69 echo " --configs \"config-file list w/ repeat factor (3*TINY01)\""
71 echo " --datestamp string"
72 echo " --defconfig string"
74 echo " --dryrun batches|scenarios|sched|script"
75 echo " --duration minutes | <seconds>s | <hours>h | <days>d"
79 echo " --jitter N [ maxsleep (us) [ maxspin (us) ] ]"
81 echo " --kconfig Kconfig-options"
83 echo " --kmake-arg kernel-make-arguments"
84 echo " --mac nn:nn:nn:nn:nn:nn"
85 echo " --memory megabytes|nnnG"
88 echo " --qemu-args qemu-arguments"
89 echo " --qemu-cmd qemu-system-..."
91 echo " --results absolute-pathname"
92 echo " --shutdown-grace seconds"
93 echo " --torture lock|rcu|rcuscale|refscale|scf|X*"
102 cpus
=$TORTURE_ALLOTED_CPUS
103 max_cpus
=$TORTURE_ALLOTED_CPUS
105 --bootargs|
--bootarg)
106 checkarg
--bootargs "(list of kernel boot arguments)" "$#" "$2" '.*' '^--'
107 TORTURE_BOOTARGS
="$TORTURE_BOOTARGS $2"
111 checkarg
--bootimage "(relative path to kernel boot image)" "$#" "$2" '[a-zA-Z0-9][a-zA-Z0-9_]*' '^--'
112 TORTURE_BOOT_IMAGE
="$2"
115 --buildonly|
--build-only)
119 checkarg
--configs "(list of config files)" "$#" "$2" '^[^/.a-z]\+$' '^--'
120 configs
="$configs $2"
124 checkarg
--cpus "(number)" "$#" "$2" '^[0-9]*$' '^--'
126 TORTURE_ALLOTED_CPUS
="$2"
127 if test -z "$TORTURE_REMOTE"
129 max_cpus
="`identify_qemu_vcpus`"
130 if test "$TORTURE_ALLOTED_CPUS" -gt "$max_cpus"
132 TORTURE_ALLOTED_CPUS
=$max_cpus
138 checkarg
--datestamp "(relative pathname)" "$#" "$2" '^[a-zA-Z0-9._/-]*$' '^--'
142 --debug-info|
--debuginfo)
143 if test -z "$TORTURE_KCONFIG_KCSAN_ARG" && test -z "$TORTURE_BOOT_GDB_ARG"
145 TORTURE_KCONFIG_KCSAN_ARG
="$debuginfo"; export TORTURE_KCONFIG_KCSAN_ARG
146 TORTURE_BOOT_GDB_ARG
="nokaslr"; export TORTURE_BOOT_GDB_ARG
148 echo "Ignored redundant --debug-info (implied by --kcsan &c)"
152 checkarg
--defconfig "defconfigtype" "$#" "$2" '^[^/][^/]*$' '^--'
157 checkarg
--dryrun "batches|sched|script" $# "$2" 'batches\|scenarios\|sched\|script' '^--'
162 checkarg
--duration "(minutes)" $# "$2" '^[0-9][0-9]*\(s\|m\|h\|d\|\)$' '^error'
164 if echo "$2" |
grep -q 's$'
167 elif echo "$2" |
grep -q 'h$'
170 elif echo "$2" |
grep -q 'd$'
174 ts
=`echo $2 | sed -e 's/[smhd]$//'`
179 TORTURE_KCONFIG_GDB_ARG
="$debuginfo"; export TORTURE_KCONFIG_GDB_ARG
180 TORTURE_BOOT_GDB_ARG
="nokaslr"; export TORTURE_BOOT_GDB_ARG
181 TORTURE_QEMU_GDB_ARG
="-s -S"; export TORTURE_QEMU_GDB_ARG
187 TORTURE_QEMU_INTERACTIVE
=1; export TORTURE_QEMU_INTERACTIVE
190 checkarg
--jitter "(# threads [ sleep [ spin ] ])" $# "$2" '^-\{,1\}[0-9]\+\( \+[0-9]\+\)\{,2\} *$' '^error$'
195 TORTURE_KCONFIG_KASAN_ARG
="$debuginfo CONFIG_KASAN=y"; export TORTURE_KCONFIG_KASAN_ARG
196 if test -n "$torture_qemu_mem_default"
201 --kconfig|
--kconfigs)
202 checkarg
--kconfig "(Kconfig options)" $# "$2" '^\(#CHECK#\)\?CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\|"[^"]*"\)\( \(#CHECK#\)\?CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\|"[^"]*"\)\)*$' '^error$'
203 TORTURE_KCONFIG_ARG
="`echo "$TORTURE_KCONFIG_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
207 TORTURE_KCONFIG_KCSAN_ARG
="$debuginfo CONFIG_KCSAN=y CONFIG_KCSAN_STRICT=y CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_VERBOSE=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y"; export TORTURE_KCONFIG_KCSAN_ARG
209 --kmake-arg|
--kmake-args)
210 checkarg
--kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$'
211 TORTURE_KMAKE_ARG
="`echo "$TORTURE_KMAKE_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
215 checkarg
--mac "(MAC address)" $# "$2" '^\([0-9a-fA-F]\{2\}:\)\{5\}[0-9a-fA-F]\{2\}$' error
220 checkarg
--memory "(memory size)" $# "$2" '^[0-9]\+[MG]\?$' error
222 torture_qemu_mem_default
=
226 TORTURE_NO_AFFINITY
="no-affinity"
229 TORTURE_INITRD
=""; export TORTURE_INITRD
231 --qemu-args|
--qemu-arg)
232 checkarg
--qemu-args "(qemu arguments)" $# "$2" '^-' '^error'
233 TORTURE_QEMU_ARG
="`echo "$TORTURE_QEMU_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
237 checkarg
--qemu-cmd "(qemu-system-...)" $# "$2" 'qemu-system-' '^--'
238 TORTURE_QEMU_CMD
="$2"
245 checkarg
--results "(absolute pathname)" "$#" "$2" '^/' '^error'
250 checkarg
--shutdown-grace "(seconds)" "$#" "$2" '^[0-9]*$' '^error'
251 TORTURE_SHUTDOWN_GRACE
=$2
255 checkarg
--torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuscale\|refscale\|scf\|X.*\)$' '^--'
257 TORTURE_MOD
="`echo $TORTURE_SUITE | sed -e 's/^\(lock\|rcu\|scf\)$/\1torture/'`"
259 if test "$TORTURE_SUITE" = rcuscale ||
test "$TORTURE_SUITE" = refscale
261 # If you really want jitter for refscale or
262 # rcuscale, specify it after specifying the rcuscale
263 # or the refscale. (But why jitter in these cases?)
268 TORTURE_TRUST_MAKE
="y"
271 echo Unknown argument
$1
278 if test -n "$dryrun" ||
test -z "$TORTURE_INITRD" || tools
/testing
/selftests
/rcutorture
/bin
/mkinitrd.sh
282 echo No initrd and unable to create one
, aborting
test >&2
286 CONFIGFRAG
=${RCUTORTURE}/configs
/${TORTURE_SUITE}; export CONFIGFRAG
288 defaultconfigs
="`tr '\012' ' ' < $CONFIGFRAG/CFLIST`"
289 if test -z "$configs"
291 configs
=$defaultconfigs
296 resdir
=$RCUTORTURE/res
299 # Create a file of test-name/#cpus pairs, sorted by decreasing #cpus.
304 [0-9]\
**|
[0-9][0-9]\
**|
[0-9][0-9][0-9]\
**|
[0-9][0-9][0-9][0-9]\
**)
305 config_reps
=`echo $CF | sed -e 's/\*.*$//'`
306 CF1
=`echo $CF | sed -e 's/^[^*]*\*//'`
313 for ((cur_rep
=0;cur_rep
<$config_reps;cur_rep
++))
315 configs_derep
="$configs_derep $CF1"
319 configs_derep
="`echo $configs_derep | sed -e "s
/\
<CFLIST\
>/$defaultconfigs/g
"`"
320 if test -n "$TORTURE_KCONFIG_GDB_ARG"
322 if test "`echo $configs_derep | wc -w`" -gt 1
324 echo "The --config list is: $configs_derep."
325 echo "Only one --config permitted with --gdb, terminating."
329 echo 'BEGIN {' > $T/cfgcpu.
awk
330 for CF1
in `echo $configs_derep | tr -s ' ' '\012' | sort -u`
332 if test -f "$CONFIGFRAG/$CF1"
334 if echo "$TORTURE_KCONFIG_ARG" |
grep -q '\<CONFIG_NR_CPUS='
336 echo "$TORTURE_KCONFIG_ARG" |
tr -s ' ' |
tr ' ' '\012' > $T/KCONFIG_ARG
337 cpu_count
=`configNR_CPUS.sh $T/KCONFIG_ARG`
339 cpu_count
=`configNR_CPUS.sh $CONFIGFRAG/$CF1`
341 cpu_count
=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
342 cpu_count
=`configfrag_boot_maxcpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
343 echo 'scenariocpu["'"$CF1"'"] = '"$cpu_count"';' >> $T/cfgcpu.
awk
345 echo "The --configs file $CF1 does not exist, terminating."
349 cat << '___EOF___' >> $T/cfgcpu.
awk
352 for (i
= 1; i
<= NF
; i
++)
353 print
$i, scenariocpu
[$i];
356 echo $configs_derep |
awk -f $T/cfgcpu.
awk > $T/cfgcpu
357 sort -k2nr $T/cfgcpu
-T="$T" > $T/cfgcpu.
sort
359 # Use a greedy bin-packing algorithm, sorting the list accordingly.
360 awk < $T/cfgcpu.
sort > $T/cfgcpu.pack
-v ncpus
=$cpus '
366 # Read file of tests and corresponding required numbers of CPUs.
376 # Each pass through the following loop creates on test batch that
377 # can be executed concurrently given ncpus. Note that a given test
378 # that requires more than the available CPUs will run in its own
379 # batch. Such tests just have to make do with what is available.
380 while (nc != ncpus) {
384 # Each pass through the following loop considers one
385 # test for inclusion in the current batch.
386 for (i = 0; i < njobs; i++) {
388 continue; # Already part of a batch.
389 if (nc >= cpus[i] || nc == ncpus) {
391 # This test fits into the current batch.
395 break; # Too-big test in its own batch.
400 # Dump out the tests in batch order.
401 for (b = 1; b <= batch; b++)
402 for (i = 0; i < njobs; i++)
404 print cf[i], cpus[i];
407 # Generate a script to execute the tests in appropriate batches.
408 cat << ___EOF___ > $T/script
409 CONFIGFRAG="$CONFIGFRAG"; export CONFIGFRAG
410 RCUTORTURE="$RCUTORTURE"; export RCUTORTURE
411 PATH="$PATH"; export PATH
412 TORTURE_ALLOTED_CPUS="$TORTURE_ALLOTED_CPUS"; export TORTURE_ALLOTED_CPUS
413 TORTURE_BOOT_IMAGE="$TORTURE_BOOT_IMAGE"; export TORTURE_BOOT_IMAGE
414 TORTURE_BUILDONLY="$TORTURE_BUILDONLY"; export TORTURE_BUILDONLY
415 TORTURE_DEFCONFIG="$TORTURE_DEFCONFIG"; export TORTURE_DEFCONFIG
416 TORTURE_INITRD="$TORTURE_INITRD"; export TORTURE_INITRD
417 TORTURE_KCONFIG_ARG="$TORTURE_KCONFIG_ARG"; export TORTURE_KCONFIG_ARG
418 TORTURE_KCONFIG_GDB_ARG="$TORTURE_KCONFIG_GDB_ARG"; export TORTURE_KCONFIG_GDB_ARG
419 TORTURE_BOOT_GDB_ARG="$TORTURE_BOOT_GDB_ARG"; export TORTURE_BOOT_GDB_ARG
420 TORTURE_QEMU_GDB_ARG="$TORTURE_QEMU_GDB_ARG"; export TORTURE_QEMU_GDB_ARG
421 TORTURE_KCONFIG_KASAN_ARG="$TORTURE_KCONFIG_KASAN_ARG"; export TORTURE_KCONFIG_KASAN_ARG
422 TORTURE_KCONFIG_KCSAN_ARG="$TORTURE_KCONFIG_KCSAN_ARG"; export TORTURE_KCONFIG_KCSAN_ARG
423 TORTURE_KMAKE_ARG="$TORTURE_KMAKE_ARG"; export TORTURE_KMAKE_ARG
424 TORTURE_MOD="$TORTURE_MOD"; export TORTURE_MOD
425 TORTURE_NO_AFFINITY="$TORTURE_NO_AFFINITY"; export TORTURE_NO_AFFINITY
426 TORTURE_QEMU_CMD="$TORTURE_QEMU_CMD"; export TORTURE_QEMU_CMD
427 TORTURE_QEMU_INTERACTIVE="$TORTURE_QEMU_INTERACTIVE"; export TORTURE_QEMU_INTERACTIVE
428 TORTURE_QEMU_MAC="$TORTURE_QEMU_MAC"; export TORTURE_QEMU_MAC
429 TORTURE_QEMU_MEM="$TORTURE_QEMU_MEM"; export TORTURE_QEMU_MEM
430 TORTURE_SHUTDOWN_GRACE="$TORTURE_SHUTDOWN_GRACE"; export TORTURE_SHUTDOWN_GRACE
431 TORTURE_SUITE="$TORTURE_SUITE"; export TORTURE_SUITE
432 TORTURE_TRUST_MAKE="$TORTURE_TRUST_MAKE"; export TORTURE_TRUST_MAKE
435 mkdir -p "$resdir" || :
438 TORTURE_RESDIR="$resdir/$ds"; export TORTURE_RESDIR
439 TORTURE_STOPFILE="$resdir/$ds/STOP.1"; export TORTURE_STOPFILE
440 echo Results directory: $resdir/$ds
441 echo $scriptname $args
442 touch $resdir/$ds/log
443 echo $scriptname $args >> $resdir/$ds/log
444 echo ${TORTURE_SUITE} > $resdir/$ds/torture_suite
445 echo Build directory: `pwd` > $resdir/$ds/testid.txt
448 echo Current commit: `git rev-parse HEAD` >> $resdir/$ds/testid.txt
449 echo >> $resdir/$ds/testid.txt
450 echo ' ---' Output of "'"git status"'": >> $resdir/$ds/testid.txt
451 git status >> $resdir/$ds/testid.txt
452 echo >> $resdir/$ds/testid.txt
453 echo >> $resdir/$ds/testid.txt
454 echo ' ---' Output of "'"git diff HEAD"'": >> $resdir/$ds/testid.txt
455 git diff HEAD >> $resdir/$ds/testid.txt
458 kvm-assign-cpus.sh
/sys
/devices
/system
/node
> $T/cpuarray.
awk
459 kvm-get-cpus-script.sh
$T/cpuarray.
awk $T/dumpbatches.
awk
460 cat << '___EOF___' >> $T/dumpbatches.
awk
471 # Dump out the scripting required to run one test batch.
472 function dump
(first
, pastlast
, batchnum
, affinitylist
)
474 print
"echo ----Start batch " batchnum
": `date` | tee -a " rd
"log";
479 if (ja
[1] == -1 && ncpus
== 0)
481 else if (ja
[1] == -1)
485 print
"TORTURE_JITTER_START=\". jitterstart.sh " njitter
" " rd
" " dur
" " ja
[2] " " ja
[3] "\"; export TORTURE_JITTER_START";
486 print
"TORTURE_JITTER_STOP=\". jitterstop.sh " rd
" \"; export TORTURE_JITTER_STOP"
487 for (j
= first
; j
< pastlast
; j
++) {
489 if (cfrep
[cf
[j
]] == "") {
494 cfr
[jn
] = cf
[j
] "." cfrep
[cf
[j
]];
496 builddir
=rd cfr
[jn
] "/build";
497 if (cpusr
[jn
] > ncpus
&& ncpus
!= 0)
501 print
"echo ", cfr
[jn
], cpusr
[jn
] ovf
": Starting build. `date` | tee -a " rd
"log";
502 print
"mkdir " rd cfr
[jn
] " || :";
503 print
"touch " builddir
".wait";
506 affinitylist
= nextcpus
(cpusr
[jn
]);
508 if (affinitylist ~
/^
[0-9,-][0-9,-]*$
/)
509 print
"export TORTURE_AFFINITY=" affinitylist
;
511 print
"export TORTURE_AFFINITY=";
512 print
"kvm-test-1-run.sh " CONFIGDIR cf
[j
], rd cfr
[jn
], dur
" \"" TORTURE_QEMU_ARG
"\" \"" TORTURE_BOOTARGS
"\" > " rd cfr
[jn
] "/kvm-test-1-run.sh.out 2>&1 &"
513 print
"echo ", cfr
[jn
], cpusr
[jn
] ovf
": Waiting for build to complete. `date` | tee -a " rd
"log";
514 print
"while test -f " builddir
".wait"
518 print
"echo ", cfr
[jn
], cpusr
[jn
] ovf
": Build complete. `date` | tee -a " rd
"log";
522 for (j
= 1; j
< jn
; j
++) {
523 builddir
=rd cfr
[j
] "/build";
524 if (TORTURE_BUILDONLY
)
525 print
"rm -f " builddir
".ready"
527 print
"mv " builddir
".ready " builddir
".run"
528 print
"runfiles=\"$runfiles " builddir
".run\""
530 print
"if test -f \"" rd cfr
[j
] "/builtkernel\""
532 print
"\techo ----", cfr
[j
], cpusr
[j
] ovf
": Kernel present. `date` | tee -a " rd
"log";
533 print
"\tneedqemurun=1"
536 if (TORTURE_BUILDONLY
&& njitter
!= 0) {
538 print
"echo Build-only run, so suppressing jitter | tee -a " rd
"log"
540 if (TORTURE_BUILDONLY
) {
543 print
"if test -n \"$needqemurun\""
545 print
"\techo ---- Starting kernels. `date` | tee -a " rd
"log";
546 print
"\t$TORTURE_JITTER_START";
547 print
"\twhile ls $runfiles > /dev/null 2>&1"
551 print
"\t$TORTURE_JITTER_STOP";
552 print
"\techo ---- All kernel runs complete. `date` | tee -a " rd
"log";
555 print
"\techo ---- No kernel runs. `date` | tee -a " rd
"log";
557 for (j
= 1; j
< jn
; j
++) {
558 print
"echo ----", cfr
[j
], cpusr
[j
] ovf
": Build/run results: | tee -a " rd
"log";
559 print
"cat " rd cfr
[j
] "/kvm-test-1-run.sh.out | tee -a " rd
"log";
569 # Each pass through the following loop considers one test.
570 for (i
= 0; i
< njobs
; i
++) {
572 # Sequential test specified, each test its own batch.
573 dump
(i
, i
+ 1, batchnum
);
576 } else if (nc
< cpus
[i
] && i
!= 0) {
577 # Out of CPUs, dump out a batch.
578 dump
(first
, i
, batchnum
);
583 # Account for the CPUs needed by the current test.
586 # Dump the last batch.
588 dump
(first
, i
, batchnum
);
591 awk < $T/cfgcpu.pack \
592 -v TORTURE_BUILDONLY
="$TORTURE_BUILDONLY" \
593 -v CONFIGDIR
="$CONFIGFRAG/" \
594 -v RCUTORTURE
="$RCUTORTURE" \
596 -v jitter
="$jitter" \
599 -v TORTURE_QEMU_ARG
="$TORTURE_QEMU_ARG" \
600 -v TORTURE_BOOTARGS
="$TORTURE_BOOTARGS" \
601 -f $T/dumpbatches.
awk >> $T/script
602 echo kvm-end-run-stats.sh
"$resdir/$ds" "$starttime" >> $T/script
604 # Extract the tests and their batches from the script.
605 grep -E 'Start batch|Starting build\.' $T/script |
grep -v ">>" |
606 sed -e 's/:.*$//' -e 's/^echo //' -e 's/-ovf//' |
613 print batchno, $1, $2
616 # As above, but one line per batch.
617 grep -v '^#' $T/batches |
awk '
623 if (oldbatch != $1) {
624 print ++n ". " curbatch;
628 curbatch = curbatch " " $2;
632 print ++n ". " curbatch;
635 if test "$dryrun" = script
639 elif test "$dryrun" = sched
641 # Extract the test run schedule from the script.
642 grep -E 'Start batch|Starting build\.' $T/script |
grep -v ">>" |
643 sed -e 's/:.*$//' -e 's/^echo //'
644 nbuilds
="`grep 'Starting build\.' $T/script |
645 grep -v ">>" | sed -e 's/:.*$//' -e 's/^echo //' |
646 awk '{ print $1 }' | grep -v '\.' | wc -l`"
647 echo Total number of builds
: $nbuilds
648 nbatches
="`grep 'Start batch' $T/script | grep -v ">>" | wc -l`"
649 echo Total number of batches
: $nbatches
651 elif test "$dryrun" = batches
655 elif test "$dryrun" = scenarios
660 # Not a dryrun. Record the batches and the number of CPUs, then run the script.
663 cp $T/batches
$resdir/$ds/batches
664 cp $T/scenarios
$resdir/$ds/scenarios
665 echo '#' cpus
=$cpus >> $resdir/$ds/batches
669 # Tracing: trace_event=rcu:rcu_grace_period,rcu:rcu_future_grace_period,rcu:rcu_grace_period_init,rcu:rcu_nocb_wake,rcu:rcu_preempt_task,rcu:rcu_unlock_preempted_task,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_kfree_callback,rcu:rcu_batch_start,rcu:rcu_invoke_callback,rcu:rcu_invoke_kfree_callback,rcu:rcu_batch_end,rcu:rcu_torture_read,rcu:rcu_barrier
670 # Function-graph tracing: ftrace=function_graph ftrace_graph_filter=sched_setaffinity,migration_cpu_stop
671 # Also --kconfig "CONFIG_FUNCTION_TRACER=y CONFIG_FUNCTION_GRAPH_TRACER=y"
672 # Control buffer size: --bootargs trace_buf_size=3k
673 # Get trace-buffer dumps on all oopses: --bootargs ftrace_dump_on_oops
674 # Ditto, but dump only the oopsing CPU: --bootargs ftrace_dump_on_oops=orig_cpu
675 # Heavy-handed way to also dump on warnings: --bootargs panic_on_warn=1