linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv: defconfigs: enable debugging options
@ 2019-11-22 22:56 Paul Walmsley
  2019-11-22 22:56 ` [PATCH 1/2] riscv: defconfigs: enable debugfs Paul Walmsley
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Paul Walmsley @ 2019-11-22 22:56 UTC (permalink / raw)
  To: linux-riscv; +Cc: linux-kernel

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

-- 
2.24.0.rc0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] riscv: defconfigs: enable debugfs
  2019-11-22 22:56 [PATCH 0/2] riscv: defconfigs: enable debugging options Paul Walmsley
@ 2019-11-22 22:56 ` Paul Walmsley
  2019-11-22 23:53   ` Palmer Dabbelt
  2019-11-23  4:17   ` Anup Patel
  2019-11-22 22:56 ` [PATCH 2/2] riscv: defconfigs: enable more debugging options Paul Walmsley
  2019-11-23  0:34 ` [PATCH 0/2] riscv: defconfigs: enable " Palmer Dabbelt
  2 siblings, 2 replies; 9+ messages in thread
From: Paul Walmsley @ 2019-11-22 22:56 UTC (permalink / raw)
  To: linux-riscv; +Cc: linux-kernel

debugfs is broadly useful, so enable it in the RISC-V defconfigs.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
---
 arch/riscv/configs/defconfig      | 1 +
 arch/riscv/configs/rv32_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 420a0dbef386..f0710d8f50cc 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -100,4 +100,5 @@ CONFIG_9P_FS=y
 CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_FS=y
 # CONFIG_RCU_TRACE is not set
diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
index 87ee6e62b64b..bdec58e6c5f7 100644
--- a/arch/riscv/configs/rv32_defconfig
+++ b/arch/riscv/configs/rv32_defconfig
@@ -97,4 +97,5 @@ CONFIG_9P_FS=y
 CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_FS=y
 # CONFIG_RCU_TRACE is not set
-- 
2.24.0.rc0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] riscv: defconfigs: enable more debugging options
  2019-11-22 22:56 [PATCH 0/2] riscv: defconfigs: enable debugging options Paul Walmsley
  2019-11-22 22:56 ` [PATCH 1/2] riscv: defconfigs: enable debugfs Paul Walmsley
@ 2019-11-22 22:56 ` Paul Walmsley
  2019-11-22 23:53   ` Palmer Dabbelt
  2019-11-23  4:25   ` Anup Patel
  2019-11-23  0:34 ` [PATCH 0/2] riscv: defconfigs: enable " Palmer Dabbelt
  2 siblings, 2 replies; 9+ messages in thread
From: Paul Walmsley @ 2019-11-22 22:56 UTC (permalink / raw)
  To: linux-riscv; +Cc: linux-kernel

Enable more debugging options in the RISC-V defconfigs to help kernel
developers catch problems with patches earlier in the development
cycle.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
---
 arch/riscv/configs/defconfig      | 23 +++++++++++++++++++++++
 arch/riscv/configs/rv32_defconfig | 23 +++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index f0710d8f50cc..e2ff95cb3390 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -101,4 +101,27 @@ CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_VM_PGFLAGS=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_PER_CPU_MAPS=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+CONFIG_WQ_WATCHDOG=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_DEBUG_TIMEKEEPING=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RWSEMS=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_STACKTRACE=y
+CONFIG_DEBUG_LIST=y
+CONFIG_DEBUG_PLIST=y
+CONFIG_DEBUG_SG=y
 # CONFIG_RCU_TRACE is not set
+CONFIG_RCU_EQS_DEBUG=y
+CONFIG_DEBUG_BLOCK_EXT_DEVT=y
+# CONFIG_FTRACE is not set
+# CONFIG_RUNTIME_TESTING_MENU is not set
+CONFIG_MEMTEST=y
diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
index bdec58e6c5f7..eb519407c841 100644
--- a/arch/riscv/configs/rv32_defconfig
+++ b/arch/riscv/configs/rv32_defconfig
@@ -98,4 +98,27 @@ CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_VM_PGFLAGS=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_PER_CPU_MAPS=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+CONFIG_WQ_WATCHDOG=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_DEBUG_TIMEKEEPING=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RWSEMS=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_STACKTRACE=y
+CONFIG_DEBUG_LIST=y
+CONFIG_DEBUG_PLIST=y
+CONFIG_DEBUG_SG=y
 # CONFIG_RCU_TRACE is not set
+CONFIG_RCU_EQS_DEBUG=y
+CONFIG_DEBUG_BLOCK_EXT_DEVT=y
+# CONFIG_FTRACE is not set
+# CONFIG_RUNTIME_TESTING_MENU is not set
+CONFIG_MEMTEST=y
-- 
2.24.0.rc0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] riscv: defconfigs: enable debugfs
  2019-11-22 22:56 ` [PATCH 1/2] riscv: defconfigs: enable debugfs Paul Walmsley
@ 2019-11-22 23:53   ` Palmer Dabbelt
  2019-11-23  4:17   ` Anup Patel
  1 sibling, 0 replies; 9+ messages in thread
From: Palmer Dabbelt @ 2019-11-22 23:53 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-riscv, linux-kernel

On Fri, 22 Nov 2019 14:56:58 PST (-0800), Paul Walmsley wrote:
> debugfs is broadly useful, so enable it in the RISC-V defconfigs.
>
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> ---
>  arch/riscv/configs/defconfig      | 1 +
>  arch/riscv/configs/rv32_defconfig | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 420a0dbef386..f0710d8f50cc 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -100,4 +100,5 @@ CONFIG_9P_FS=y
>  CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
> +CONFIG_DEBUG_FS=y
>  # CONFIG_RCU_TRACE is not set
> diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
> index 87ee6e62b64b..bdec58e6c5f7 100644
> --- a/arch/riscv/configs/rv32_defconfig
> +++ b/arch/riscv/configs/rv32_defconfig
> @@ -97,4 +97,5 @@ CONFIG_9P_FS=y
>  CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
> +CONFIG_DEBUG_FS=y
>  # CONFIG_RCU_TRACE is not set

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] riscv: defconfigs: enable more debugging options
  2019-11-22 22:56 ` [PATCH 2/2] riscv: defconfigs: enable more debugging options Paul Walmsley
@ 2019-11-22 23:53   ` Palmer Dabbelt
  2019-11-23  4:25   ` Anup Patel
  1 sibling, 0 replies; 9+ messages in thread
From: Palmer Dabbelt @ 2019-11-22 23:53 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-riscv, linux-kernel

On Fri, 22 Nov 2019 14:56:59 PST (-0800), Paul Walmsley wrote:
> Enable more debugging options in the RISC-V defconfigs to help kernel
> developers catch problems with patches earlier in the development
> cycle.
>
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> ---
>  arch/riscv/configs/defconfig      | 23 +++++++++++++++++++++++
>  arch/riscv/configs/rv32_defconfig | 23 +++++++++++++++++++++++
>  2 files changed, 46 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index f0710d8f50cc..e2ff95cb3390 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -101,4 +101,27 @@ CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
>  CONFIG_DEBUG_FS=y
> +CONFIG_DEBUG_PAGEALLOC=y
> +CONFIG_DEBUG_VM=y
> +CONFIG_DEBUG_VM_PGFLAGS=y
> +CONFIG_DEBUG_MEMORY_INIT=y
> +CONFIG_DEBUG_PER_CPU_MAPS=y
> +CONFIG_SOFTLOCKUP_DETECTOR=y
> +CONFIG_WQ_WATCHDOG=y
> +CONFIG_SCHED_STACK_END_CHECK=y
> +CONFIG_DEBUG_TIMEKEEPING=y
> +CONFIG_DEBUG_RT_MUTEXES=y
> +CONFIG_DEBUG_SPINLOCK=y
> +CONFIG_DEBUG_MUTEXES=y
> +CONFIG_DEBUG_RWSEMS=y
> +CONFIG_DEBUG_ATOMIC_SLEEP=y
> +CONFIG_STACKTRACE=y
> +CONFIG_DEBUG_LIST=y
> +CONFIG_DEBUG_PLIST=y
> +CONFIG_DEBUG_SG=y
>  # CONFIG_RCU_TRACE is not set
> +CONFIG_RCU_EQS_DEBUG=y
> +CONFIG_DEBUG_BLOCK_EXT_DEVT=y
> +# CONFIG_FTRACE is not set
> +# CONFIG_RUNTIME_TESTING_MENU is not set
> +CONFIG_MEMTEST=y
> diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
> index bdec58e6c5f7..eb519407c841 100644
> --- a/arch/riscv/configs/rv32_defconfig
> +++ b/arch/riscv/configs/rv32_defconfig
> @@ -98,4 +98,27 @@ CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
>  CONFIG_DEBUG_FS=y
> +CONFIG_DEBUG_PAGEALLOC=y
> +CONFIG_DEBUG_VM=y
> +CONFIG_DEBUG_VM_PGFLAGS=y
> +CONFIG_DEBUG_MEMORY_INIT=y
> +CONFIG_DEBUG_PER_CPU_MAPS=y
> +CONFIG_SOFTLOCKUP_DETECTOR=y
> +CONFIG_WQ_WATCHDOG=y
> +CONFIG_SCHED_STACK_END_CHECK=y
> +CONFIG_DEBUG_TIMEKEEPING=y
> +CONFIG_DEBUG_RT_MUTEXES=y
> +CONFIG_DEBUG_SPINLOCK=y
> +CONFIG_DEBUG_MUTEXES=y
> +CONFIG_DEBUG_RWSEMS=y
> +CONFIG_DEBUG_ATOMIC_SLEEP=y
> +CONFIG_STACKTRACE=y
> +CONFIG_DEBUG_LIST=y
> +CONFIG_DEBUG_PLIST=y
> +CONFIG_DEBUG_SG=y
>  # CONFIG_RCU_TRACE is not set
> +CONFIG_RCU_EQS_DEBUG=y
> +CONFIG_DEBUG_BLOCK_EXT_DEVT=y
> +# CONFIG_FTRACE is not set
> +# CONFIG_RUNTIME_TESTING_MENU is not set
> +CONFIG_MEMTEST=y

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] riscv: defconfigs: enable debugging options
  2019-11-22 22:56 [PATCH 0/2] riscv: defconfigs: enable debugging options Paul Walmsley
  2019-11-22 22:56 ` [PATCH 1/2] riscv: defconfigs: enable debugfs Paul Walmsley
  2019-11-22 22:56 ` [PATCH 2/2] riscv: defconfigs: enable more debugging options Paul Walmsley
@ 2019-11-23  0:34 ` Palmer Dabbelt
  2019-11-23  3:13   ` Paul Walmsley
  2 siblings, 1 reply; 9+ messages in thread
From: Palmer Dabbelt @ 2019-11-23  0:34 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-riscv, linux-kernel

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!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] riscv: defconfigs: enable debugging options
  2019-11-23  0:34 ` [PATCH 0/2] riscv: defconfigs: enable " Palmer Dabbelt
@ 2019-11-23  3:13   ` Paul Walmsley
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Walmsley @ 2019-11-23  3:13 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: linux-riscv, linux-kernel

On Fri, 22 Nov 2019, Palmer Dabbelt wrote:

> 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.

Thanks - that's a good idea.

Will take a look to see what tests can be enabled that don't take too much 
time (and don't conflict) and will put together another patch.  If anyone 
has any feedback or suggestions here, they would be welcome.


- Paul

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] riscv: defconfigs: enable debugfs
  2019-11-22 22:56 ` [PATCH 1/2] riscv: defconfigs: enable debugfs Paul Walmsley
  2019-11-22 23:53   ` Palmer Dabbelt
@ 2019-11-23  4:17   ` Anup Patel
  1 sibling, 0 replies; 9+ messages in thread
From: Anup Patel @ 2019-11-23  4:17 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-riscv, linux-kernel@vger.kernel.org List

On Sat, Nov 23, 2019 at 4:27 AM Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> debugfs is broadly useful, so enable it in the RISC-V defconfigs.
>
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> ---
>  arch/riscv/configs/defconfig      | 1 +
>  arch/riscv/configs/rv32_defconfig | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 420a0dbef386..f0710d8f50cc 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -100,4 +100,5 @@ CONFIG_9P_FS=y
>  CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
> +CONFIG_DEBUG_FS=y
>  # CONFIG_RCU_TRACE is not set
> diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
> index 87ee6e62b64b..bdec58e6c5f7 100644
> --- a/arch/riscv/configs/rv32_defconfig
> +++ b/arch/riscv/configs/rv32_defconfig
> @@ -97,4 +97,5 @@ CONFIG_9P_FS=y
>  CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
> +CONFIG_DEBUG_FS=y
>  # CONFIG_RCU_TRACE is not set
> --
> 2.24.0.rc0
>

Reviewed-by: Anup Patel <anup@brainfault.org>

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] riscv: defconfigs: enable more debugging options
  2019-11-22 22:56 ` [PATCH 2/2] riscv: defconfigs: enable more debugging options Paul Walmsley
  2019-11-22 23:53   ` Palmer Dabbelt
@ 2019-11-23  4:25   ` Anup Patel
  1 sibling, 0 replies; 9+ messages in thread
From: Anup Patel @ 2019-11-23  4:25 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-riscv, linux-kernel@vger.kernel.org List

On Sat, Nov 23, 2019 at 4:28 AM Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> Enable more debugging options in the RISC-V defconfigs to help kernel
> developers catch problems with patches earlier in the development
> cycle.

Lot the debug options enabled by this patch have big performance
impact. I would suggest to have separate debug defconfig for
RV32 and RV64 with debug options enabled instead of enabling
these in regular defconfigs.

>
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> ---
>  arch/riscv/configs/defconfig      | 23 +++++++++++++++++++++++
>  arch/riscv/configs/rv32_defconfig | 23 +++++++++++++++++++++++
>  2 files changed, 46 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index f0710d8f50cc..e2ff95cb3390 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -101,4 +101,27 @@ CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
>  CONFIG_DEBUG_FS=y
> +CONFIG_DEBUG_PAGEALLOC=y
> +CONFIG_DEBUG_VM=y
> +CONFIG_DEBUG_VM_PGFLAGS=y
> +CONFIG_DEBUG_MEMORY_INIT=y
> +CONFIG_DEBUG_PER_CPU_MAPS=y

> +CONFIG_SOFTLOCKUP_DETECTOR=y

This one is fine.

> +CONFIG_WQ_WATCHDOG=y

Is WQ_WATCHDOG as debug option ?

> +CONFIG_SCHED_STACK_END_CHECK=y
> +CONFIG_DEBUG_TIMEKEEPING=y
> +CONFIG_DEBUG_RT_MUTEXES=y
> +CONFIG_DEBUG_SPINLOCK=y
> +CONFIG_DEBUG_MUTEXES=y
> +CONFIG_DEBUG_RWSEMS=y
> +CONFIG_DEBUG_ATOMIC_SLEEP=y
> +CONFIG_STACKTRACE=y
> +CONFIG_DEBUG_LIST=y
> +CONFIG_DEBUG_PLIST=y
> +CONFIG_DEBUG_SG=y

All these debug options reduce kernel performance
in a noticeable way. Please have separate defconfig
for these options.

>  # CONFIG_RCU_TRACE is not set
> +CONFIG_RCU_EQS_DEBUG=y
> +CONFIG_DEBUG_BLOCK_EXT_DEVT=y
> +# CONFIG_FTRACE is not set
> +# CONFIG_RUNTIME_TESTING_MENU is not set
> +CONFIG_MEMTEST=y
> diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
> index bdec58e6c5f7..eb519407c841 100644
> --- a/arch/riscv/configs/rv32_defconfig
> +++ b/arch/riscv/configs/rv32_defconfig
> @@ -98,4 +98,27 @@ CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
>  CONFIG_DEBUG_FS=y
> +CONFIG_DEBUG_PAGEALLOC=y
> +CONFIG_DEBUG_VM=y
> +CONFIG_DEBUG_VM_PGFLAGS=y
> +CONFIG_DEBUG_MEMORY_INIT=y
> +CONFIG_DEBUG_PER_CPU_MAPS=y
> +CONFIG_SOFTLOCKUP_DETECTOR=y
> +CONFIG_WQ_WATCHDOG=y
> +CONFIG_SCHED_STACK_END_CHECK=y
> +CONFIG_DEBUG_TIMEKEEPING=y
> +CONFIG_DEBUG_RT_MUTEXES=y
> +CONFIG_DEBUG_SPINLOCK=y
> +CONFIG_DEBUG_MUTEXES=y
> +CONFIG_DEBUG_RWSEMS=y
> +CONFIG_DEBUG_ATOMIC_SLEEP=y
> +CONFIG_STACKTRACE=y
> +CONFIG_DEBUG_LIST=y
> +CONFIG_DEBUG_PLIST=y
> +CONFIG_DEBUG_SG=y
>  # CONFIG_RCU_TRACE is not set
> +CONFIG_RCU_EQS_DEBUG=y
> +CONFIG_DEBUG_BLOCK_EXT_DEVT=y
> +# CONFIG_FTRACE is not set
> +# CONFIG_RUNTIME_TESTING_MENU is not set
> +CONFIG_MEMTEST=y

Same comments as above.

> --
> 2.24.0.rc0
>

The debug and trace instrumentation although helpful
in development comes with performance overhead. We
should be careful in enabling debug and trace options
by default in defconfigs.

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-23  4:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 22:56 [PATCH 0/2] riscv: defconfigs: enable debugging options Paul Walmsley
2019-11-22 22:56 ` [PATCH 1/2] riscv: defconfigs: enable debugfs Paul Walmsley
2019-11-22 23:53   ` Palmer Dabbelt
2019-11-23  4:17   ` Anup Patel
2019-11-22 22:56 ` [PATCH 2/2] riscv: defconfigs: enable more debugging options Paul Walmsley
2019-11-22 23:53   ` Palmer Dabbelt
2019-11-23  4:25   ` Anup Patel
2019-11-23  0:34 ` [PATCH 0/2] riscv: defconfigs: enable " Palmer Dabbelt
2019-11-23  3:13   ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).