]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
um: Fix time-travel=inf-cpu with xor/raid6
authorJohannes Berg <johannes.berg@intel.com>
Fri, 13 Dec 2019 09:01:28 +0000 (10:01 +0100)
committerRichard Weinberger <richard@nod.at>
Sun, 19 Jan 2020 21:42:06 +0000 (22:42 +0100)
Today, I erroneously built a time-travel configuration with btrfs
enabled, and noticed it cannot boot in time-travel=inf-cpu mode,
both xor and raid6 speed measurement gets stuck.

For xor, work around it by picking the first algorithm if inf-cpu
mode is enabled.

For raid6, I didn't find such a workaround, so disallow enabling
time-travel mode if RAID6_PQ_BENCHMARK is enabled.

With this, and RAID6_PQ_BENCHMARK disabled, I can boot a kernel
that has btrfs enabled in time-travel=inf-cpu mode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/Kconfig
arch/um/include/asm/Kbuild
arch/um/include/asm/xor.h [new file with mode: 0644]

index 6f0edd0c0220f40dac6fd3c89309458e9f0981e6..0917f8443c2859d56e86fa62b6c068e53d328b45 100644 (file)
@@ -189,6 +189,8 @@ config SECCOMP
 config UML_TIME_TRAVEL_SUPPORT
        bool
        prompt "Support time-travel mode (e.g. for test execution)"
+       # inf-cpu mode is incompatible with the benchmarking
+       depends on !RAID6_PQ_BENCHMARK
        help
          Enable this option to support time travel inside the UML instance.
 
index 398006d27e40c420c1b7203ce1d8e643bf9c1a68..db7d9d4e30d83b9353d0235d35018a46c999795a 100644 (file)
@@ -25,5 +25,4 @@ generic-y += switch_to.h
 generic-y += topology.h
 generic-y += trace_clock.h
 generic-y += word-at-a-time.h
-generic-y += xor.h
 generic-y += kprobes.h
diff --git a/arch/um/include/asm/xor.h b/arch/um/include/asm/xor.h
new file mode 100644 (file)
index 0000000..7a3208c
--- /dev/null
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm-generic/xor.h>
+#include <shared/timer-internal.h>
+
+/* pick an arbitrary one - measuring isn't possible with inf-cpu */
+#define XOR_SELECT_TEMPLATE(x) \
+       (time_travel_mode == TT_MODE_INFCPU ? &xor_block_8regs : NULL)