Re: [PATCH 0/2] riscv: defconfigs: enable debugging options

From: Palmer Dabbelt
Date: Fri Nov 22 2019 - 19:34:35 EST


On Fri, 22 Nov 2019 14:56:57 PST (-0800), Paul Walmsley wrote:
> Enable more debugging options in the defconfig. Debugfs is generally
> useful for everyone; the other options are intended to make it easier
> for developers and testers to catch problems earlier.
>
>
> - Paul
>
> Paul Walmsley (2):
> riscv: defconfigs: enable debugfs
> riscv: defconfigs: enable more debugging options
>
> arch/riscv/configs/defconfig | 24 ++++++++++++++++++++++++
> arch/riscv/configs/rv32_defconfig | 24 ++++++++++++++++++++++++
> 2 files changed, 48 insertions(+)
>
>
> Kernel object size difference:
> text data bss dec hex filename
> 6665154 2132584 312608 9110346 8b034a vmlinux.rv64.orig
> 6779347 2299448 313600 9392395 8f510b vmlinux.rv64.patched
> 6445414 1797616 255248 8498278 81ac66 vmlinux.rv32.orig
> 6552029 1921996 257448 8731473 853b51 vmlinux.rv32.patched

Does it make sense to turn on some CONFIG_*_SELFTEST entries as well? I know
I've found RISC-V bugs with ATOMIC64_SELFTEST before, but they do take a while
to run. I just turned on

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 420a0dbef386..90001c3746cd 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -100,4 +100,18 @@ CONFIG_9P_FS=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_DEV_VIRTIO=y
CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RWSEMS=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
+CONFIG_LOCK_TORTURE_TEST=y
+CONFIG_WW_MUTEX_SELFTEST=y
+CONFIG_RCU_PERF_TEST=y
+CONFIG_RCU_TORTURE_TEST=y
# CONFIG_RCU_TRACE is not set
+CONFIG_PERCPU_TEST=m
+CONFIG_ATOMIC64_SELFTEST=y
+CONFIG_TEST_LKM=m
+CONFIG_TEST_USER_COPY=m

as an experiment and OE looks like it's still functional, but it looks like the
lock torture stuff keeps running and the RCU torture can't run at the same
time.

Either way, this looks good to me!