[LTP] [Patch V2] lib: multiply the max_runtime if detect kernel debug options
Petr Vorel
pvorel@suse.cz
Mon Dec 9 13:14:58 CET 2024
Hi Li,
...
> > > Notes:
> > > Hi, @Cyril, @Petr, I have no openSUSE and Ubuntu at my hands, could
> > you
> > > help check if the debug configures are useful to the other two
> > platforms?
> > > Or, should we add any more options there? Thanks.
> > openSUSE debug kernel:
> > $ grep ^CONFIG_DEBUG /boot/config-6.13.0-rc1-1.g492f944-debug # openSUSE
> > Tumbleweed
> > CONFIG_DEBUG_RSEQ=y
> > CONFIG_DEBUG_GPIO=y
> > CONFIG_DEBUG_BUGVERBOSE=y
> > CONFIG_DEBUG_KERNEL=y
> > CONFIG_DEBUG_MISC=y
> > CONFIG_DEBUG_INFO=y
> > CONFIG_DEBUG_INFO_DWARF5=y
> > CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
> > CONFIG_DEBUG_INFO_BTF=y
> > CONFIG_DEBUG_INFO_BTF_MODULES=y
> > CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
> > CONFIG_DEBUG_FS=y
> > CONFIG_DEBUG_FS_ALLOW_ALL=y
> > CONFIG_DEBUG_NET=y
> > CONFIG_DEBUG_PAGEALLOC=y
> > CONFIG_DEBUG_RODATA_TEST=y
> > CONFIG_DEBUG_MEMORY_INIT=y
> > CONFIG_DEBUG_SHIRQ=y
> > CONFIG_DEBUG_RT_MUTEXES=y
> > CONFIG_DEBUG_SPINLOCK=y
> > CONFIG_DEBUG_MUTEXES=y
> > => openSUSE debug kernel would be detected by:
> > CONFIG_DEBUG_NET=y
> > CONFIG_DEBUG_PAGEALLOC=y
> > CONFIG_DEBUG_RT_MUTEXES=y
> > CONFIG_DEBUG_SPINLOCK=y
> > CONFIG_DEBUG_MUTEXES=y
> Thanks for much for providing these.
> > => if you want to add more:
> > CONFIG_DEBUG_RSEQ=y
> > CONFIG_DEBUG_GPIO=y
> > CONFIG_DEBUG_RODATA_TEST=y
> > CONFIG_DEBUG_SHIRQ=y
> Those kernel debug options on performance are generally less severe
> compared to options like CONFIG_KASAN or CONFIG_PROVE_LOCKING.
> We would like to recognize some configs that obviously lower the system
> speed.
Makes sense.
> > Also FYI some options from default kernel (to see which cannot be used):
> > $ grep ^CONFIG_DEBUG /boot/config-6.13.0-rc1-1.g492f944-default # openSUSE
> > Tumbleweed
> > CONFIG_DEBUG_BUGVERBOSE=y
> > CONFIG_DEBUG_KERNEL=y
> > CONFIG_DEBUG_MISC=y
> > CONFIG_DEBUG_INFO=y
> > CONFIG_DEBUG_INFO_DWARF5=y
> > CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
> > CONFIG_DEBUG_INFO_BTF=y
> > CONFIG_DEBUG_INFO_BTF_MODULES=y
> > CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
> > CONFIG_DEBUG_FS=y
> > CONFIG_DEBUG_FS_ALLOW_ALL=y
> > CONFIG_DEBUG_PAGEALLOC=y
> > CONFIG_DEBUG_MEMORY_INIT=y
> > $ grep ^CONFIG_DEBUG /boot/config-6.11.10-amd64 # Debian
> > 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_INFO_BTF=y
> > CONFIG_DEBUG_INFO_BTF_MODULES=y
> > CONFIG_DEBUG_FS=y
> > CONFIG_DEBUG_FS_ALLOW_ALL=y
> > CONFIG_DEBUG_WX=y
> > CONFIG_DEBUG_MEMORY_INIT=y
> > CONFIG_DEBUG_LIST=y
> > Do Debian/Ubuntu even have debug kernel? I know only about
> > linux-image-amd64-dbg
> > [1], but that package has just debugging symbols.
> Maybe we shouldn't declare that the purpose is to debug kernel,
> any kernel build with the slower configs should impacted.
+1
> > Which tests should I run on the kernel to see if timeout is ok?
> Any test with set .max_runtime you can try, for this patch our original
> work is for starvation.c but now it is generic.
I'll try to do it this week. Also, don't feel blocked by my testing (can be
merged without it).
Acked-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> > Kind regards,
> > Petr
> > [1] https://packages.debian.org/sid/linux-image-amd64-dbg
> > ...
> > > +/*
> > > + * List of debug-kernel config options that may degrade performance
> > when enabled.
> > > + */
> > > +static const char * const tst_kconf_debug_options[][2] = {
> > > + {"CONFIG_PROVE_LOCKING=y", NULL},
> > > + {"CONFIG_LOCKDEP=y", NULL},
> > > + {"CONFIG_DEBUG_SPINLOCK=y", NULL},
> > > + {"CONFIG_DEBUG_RT_MUTEXES=y", NULL},
> > > + {"CONFIG_DEBUG_MUTEXES=y", NULL},
> > > + {"CONFIG_DEBUG_PAGEALLOC=y", NULL},
> > > + {"CONFIG_KASAN=y", NULL},
> > > + {"CONFIG_SLUB_RCU_DEBUG=y", NULL},
> > > + {"CONFIG_TRACE_IRQFLAGS=y", NULL},
> > > + {"CONFIG_LATENCYTOP=y", NULL},
> > > + {"CONFIG_DEBUG_NET=y", NULL},
> > > + {"CONFIG_EXT4_DEBUG=y", NULL},
> > > + {"CONFIG_QUOTA_DEBUG=y", NULL},
> > > + {"CONFIG_FAULT_INJECTION=y", NULL},
> > > + {"CONFIG_DEBUG_OBJECTS=y", NULL},
> > > + {NULL, NULL}
> > ...
More information about the ltp
mailing list