Our kernel enables CONFIG_DEBUG_PREEMPT: $ grep CONFIG_DEBUG_PREEMPT /yocto/ross/build/tmp/work/qemuarm64-poky-linux/linux-yocto/6.5.7+git/linux-qemuarm64-standard-build/.config CONFIG_DEBUG_PREEMPT=y (poky nanbield, qemuarm64) As per https://lore.kernel.org/lkml/ZTKScoO9kz_LxNMG@ariel/ this is basically a 20% performance hit in some benchmarks. I think we should disable it in default kernels.
We don't have it on by default, only the selftests do: lib/oeqa/selftest/cases/runtime_test.py:KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc" So if we don't want it on for the tests, we need to change it there .. but that would get us less information about crashes and issues, so it isn't my call to make.
I hate to disagree with you, but in a brand new build tree: $ bitbake virtual/kernel -c showconfig Config file written to /yocto/ross/buildnew/tmp/work/qemux86_64-poky-linux/linux-yocto/6.5.7+git/linux-qemux86_64-standard-build/.config $ grep DEBUG.*= /yocto/ross/buildnew/tmp/work/qemux86_64-poky-linux/linux-yocto/6.5.7+git/linux-qemux86_64-standard-build/.config CONFIG_CGROUP_DEBUG=y CONFIG_X86_DEBUGCTLMSR=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y CONFIG_PM_SLEEP_DEBUG=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_BLK_DEBUG_FS=y CONFIG_BT_DEBUGFS=y CONFIG_PNP_DEBUG_MESSAGES=y CONFIG_SCSI_DEBUG=m CONFIG_CIFS_DEBUG=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_MISC=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_INFO_COMPRESSED_NONE=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS_ALLOW_ALL=y CONFIG_ARCH_HAS_EARLY_DEBUG=y CONFIG_SLUB_DEBUG=y CONFIG_ARCH_HAS_DEBUG_WX=y CONFIG_HAVE_DEBUG_KMEMLEAK=y CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_SCHED_DEBUG=y CONFIG_DEBUG_PREEMPT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_X86_DEBUG_FPU=y After the configure task the top-level .config is the active config, correct?
Right, it is also enabled by the poky distro: meta-poky/conf/distro/poky.conf:KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc" So that is your culprit for the enable.
That seems suboptimal.
If SPDX needs symbols, can we have separate "debug symbols" and "debug statements"?
This is under unit test now.
https://git.yoctoproject.org/yocto-kernel-cache/log/?h=yocto-6.5