Skip to content

Commit d65197a

Browse files
jmberg-intelrichardweinberger
authored andcommitted
um: Fix time-travel=inf-cpu with xor/raid6
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 <[email protected]> Acked-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 87c9366 commit d65197a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

arch/um/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ config SECCOMP
189189
config UML_TIME_TRAVEL_SUPPORT
190190
bool
191191
prompt "Support time-travel mode (e.g. for test execution)"
192+
# inf-cpu mode is incompatible with the benchmarking
193+
depends on !RAID6_PQ_BENCHMARK
192194
help
193195
Enable this option to support time travel inside the UML instance.
194196

arch/um/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ generic-y += switch_to.h
2525
generic-y += topology.h
2626
generic-y += trace_clock.h
2727
generic-y += word-at-a-time.h
28-
generic-y += xor.h
2928
generic-y += kprobes.h

arch/um/include/asm/xor.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#include <asm-generic/xor.h>
3+
#include <shared/timer-internal.h>
4+
5+
/* pick an arbitrary one - measuring isn't possible with inf-cpu */
6+
#define XOR_SELECT_TEMPLATE(x) \
7+
(time_travel_mode == TT_MODE_INFCPU ? &xor_block_8regs : NULL)

0 commit comments

Comments
 (0)