Various Linux kernel DEBUG options have big performance impact
so these should not be enabled in RISC-V normal defconfigs.
Instead we should have separate RISC-V debug defconfigs having
these DEBUG options enabled. This way Linux RISC-V can build both
non-debug and debug kernels separately.
Signed-off-by: Anup Patel <[email protected]>
---
.../configs/{defconfig => debug_defconfig} | 0
arch/riscv/configs/defconfig | 23 -------------------
.../{rv32_defconfig => rv32_debug_defconfig} | 0
arch/riscv/configs/rv32_defconfig | 23 -------------------
4 files changed, 46 deletions(-)
copy arch/riscv/configs/{defconfig => debug_defconfig} (100%)
copy arch/riscv/configs/{rv32_defconfig => rv32_debug_defconfig} (100%)
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/debug_defconfig
similarity index 100%
copy from arch/riscv/configs/defconfig
copy to arch/riscv/configs/debug_defconfig
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index e2ff95cb3390..f0710d8f50cc 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -101,27 +101,4 @@ 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_debug_defconfig
similarity index 100%
copy from arch/riscv/configs/rv32_defconfig
copy to arch/riscv/configs/rv32_debug_defconfig
diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
index eb519407c841..bdec58e6c5f7 100644
--- a/arch/riscv/configs/rv32_defconfig
+++ b/arch/riscv/configs/rv32_defconfig
@@ -98,27 +98,4 @@ 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.17.1
On Thu, 5 Dec 2019, Anup Patel wrote:
> Various Linux kernel DEBUG options have big performance impact
> so these should not be enabled in RISC-V normal defconfigs.
>
> Instead we should have separate RISC-V debug defconfigs having
> these DEBUG options enabled. This way Linux RISC-V can build both
> non-debug and debug kernels separately.
I respect your point of view, but until the RISC-V kernel port is more
mature, I personally am not planning to merge this patch, for reasons
discussed in the defconfig patch descriptions and the subsequent pull
request threads.
I'm sure we'll revisit this in the future to realign with the defconfig
debug settings for more mature architecture ports - but my guess is that
we'll probably avoid creating debug_defconfigs, since only S390 does that.
- Paul
On Thu, Dec 05, 2019 at 10:03:34PM +0530, Anup Patel wrote:
> On Thu, Dec 5, 2019 at 8:33 AM Paul Walmsley <[email protected]> wrote:
> >
> > On Thu, 5 Dec 2019, Anup Patel wrote:
> >
> > > Various Linux kernel DEBUG options have big performance impact
> > > so these should not be enabled in RISC-V normal defconfigs.
> > >
> > > Instead we should have separate RISC-V debug defconfigs having
> > > these DEBUG options enabled. This way Linux RISC-V can build both
> > > non-debug and debug kernels separately.
> >
> > I respect your point of view, but until the RISC-V kernel port is more
> > mature, I personally am not planning to merge this patch, for reasons
> > discussed in the defconfig patch descriptions and the subsequent pull
> > request threads.
> >
> > I'm sure we'll revisit this in the future to realign with the defconfig
> > debug settings for more mature architecture ports - but my guess is that
> > we'll probably avoid creating debug_defconfigs, since only S390 does that.
>
> We have a lot of users (Yocto and Buildroot) dependent on the Linux
> defconfig. I understand that you need DEBUG options for SiFive internal
> use but this does not mean all users dependent on Linux defconfig
> should be penalized in-terms of performance.
>
> This is the right time to introduce debug defconfigs so that you can
> use it for your SiFive internal use and all users dependent on normal
> defconfigs are not penalized in-terms of performance.
>
> If you still don't want debug defconfigs then I recommend reverting
> your DEBUG options patch and you can find an alternative way to
> enable DEBUG options for SiFive internal use.
None of my business (except that I watch threads with debug in the
subject line) but why propose putting debug options into any kind
of defconfig. If you want standardized set debug options to chase
problems why can't they into a .config file rather than a defconfig
file.
In use it will look like:
make defconfig extra_debug.config
That way you don't have to maintain two almost identical files that will
inevitably drift apart.
Daniel.
On Thu, 5 Dec 2019, Anup Patel wrote:
> I understand that you need DEBUG options for SiFive internal
> use
[ ... ]
> This is the right time to introduce debug defconfigs so that you can
> use it for your SiFive internal use
[ ... ]
> and you can find an alternative way to enable DEBUG options for SiFive
> internal use.
What leads you to conclude that this was done for SiFive internal use?
- Paul
On Thu, Dec 5, 2019 at 10:31 PM Paul Walmsley <[email protected]> wrote:
>
> On Thu, 5 Dec 2019, Anup Patel wrote:
>
> > I understand that you need DEBUG options for SiFive internal
> > use
>
> [ ... ]
>
> > This is the right time to introduce debug defconfigs so that you can
> > use it for your SiFive internal use
>
> [ ... ]
>
> > and you can find an alternative way to enable DEBUG options for SiFive
> > internal use.
>
> What leads you to conclude that this was done for SiFive internal use?
Why else you need it ?
It is not at all a standard practice to put DEBUG options in defconfigs
across architectures.
Regards,
Anup
On Thu, Dec 5, 2019 at 10:17 PM Daniel Thompson
<[email protected]> wrote:
>
> On Thu, Dec 05, 2019 at 10:03:34PM +0530, Anup Patel wrote:
> > On Thu, Dec 5, 2019 at 8:33 AM Paul Walmsley <[email protected]> wrote:
> > >
> > > On Thu, 5 Dec 2019, Anup Patel wrote:
> > >
> > > > Various Linux kernel DEBUG options have big performance impact
> > > > so these should not be enabled in RISC-V normal defconfigs.
> > > >
> > > > Instead we should have separate RISC-V debug defconfigs having
> > > > these DEBUG options enabled. This way Linux RISC-V can build both
> > > > non-debug and debug kernels separately.
> > >
> > > I respect your point of view, but until the RISC-V kernel port is more
> > > mature, I personally am not planning to merge this patch, for reasons
> > > discussed in the defconfig patch descriptions and the subsequent pull
> > > request threads.
> > >
> > > I'm sure we'll revisit this in the future to realign with the defconfig
> > > debug settings for more mature architecture ports - but my guess is that
> > > we'll probably avoid creating debug_defconfigs, since only S390 does that.
> >
> > We have a lot of users (Yocto and Buildroot) dependent on the Linux
> > defconfig. I understand that you need DEBUG options for SiFive internal
> > use but this does not mean all users dependent on Linux defconfig
> > should be penalized in-terms of performance.
> >
> > This is the right time to introduce debug defconfigs so that you can
> > use it for your SiFive internal use and all users dependent on normal
> > defconfigs are not penalized in-terms of performance.
> >
> > If you still don't want debug defconfigs then I recommend reverting
> > your DEBUG options patch and you can find an alternative way to
> > enable DEBUG options for SiFive internal use.
>
> None of my business (except that I watch threads with debug in the
> subject line) but why propose putting debug options into any kind
> of defconfig. If you want standardized set debug options to chase
> problems why can't they into a .config file rather than a defconfig
> file.
>
> In use it will look like:
> make defconfig extra_debug.config
>
> That way you don't have to maintain two almost identical files that will
> inevitably drift apart.
This is a good suggestion. I will certainly try it out at my end and send
a v2 with "extra_debug.config" file.
Thanks,
Anup
On Thu, Dec 5, 2019 at 8:33 AM Paul Walmsley <[email protected]> wrote:
>
> On Thu, 5 Dec 2019, Anup Patel wrote:
>
> > Various Linux kernel DEBUG options have big performance impact
> > so these should not be enabled in RISC-V normal defconfigs.
> >
> > Instead we should have separate RISC-V debug defconfigs having
> > these DEBUG options enabled. This way Linux RISC-V can build both
> > non-debug and debug kernels separately.
>
> I respect your point of view, but until the RISC-V kernel port is more
> mature, I personally am not planning to merge this patch, for reasons
> discussed in the defconfig patch descriptions and the subsequent pull
> request threads.
>
> I'm sure we'll revisit this in the future to realign with the defconfig
> debug settings for more mature architecture ports - but my guess is that
> we'll probably avoid creating debug_defconfigs, since only S390 does that.
We have a lot of users (Yocto and Buildroot) dependent on the Linux
defconfig. I understand that you need DEBUG options for SiFive internal
use but this does not mean all users dependent on Linux defconfig
should be penalized in-terms of performance.
This is the right time to introduce debug defconfigs so that you can
use it for your SiFive internal use and all users dependent on normal
defconfigs are not penalized in-terms of performance.
If you still don't want debug defconfigs then I recommend reverting
your DEBUG options patch and you can find an alternative way to
enable DEBUG options for SiFive internal use.
Regards,
Anup
On Thu, 5 Dec 2019, Anup Patel wrote:
> On Thu, Dec 5, 2019 at 10:31 PM Paul Walmsley <[email protected]> wrote:
>
> > What leads you to conclude that this was done for SiFive internal use?
>
> Why else you need it ?
Suppose you were to assume that I had reasons for doing it that aren't
related to SiFive. What might they be?
- Paul
On Fri, Dec 6, 2019 at 4:44 AM Paul Walmsley <[email protected]> wrote:
>
> On Thu, 5 Dec 2019, Anup Patel wrote:
>
> > On Thu, Dec 5, 2019 at 10:31 PM Paul Walmsley <[email protected]> wrote:
> >
> > > What leads you to conclude that this was done for SiFive internal use?
> >
> > Why else you need it ?
>
> Suppose you were to assume that I had reasons for doing it that aren't
> related to SiFive. What might they be?
It does not matter what your reasons were. Having DEBUG options in
defconfigs is not the right way to do it.
I have posted v2 of this patch. Please have a look. It's much cleaner
now and does not have performance impact for people using defconfigs.
Regards,
Anup