From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [Patch V2] lib: multiply the max_runtime if detect kernel debug options
Date: Mon, 9 Dec 2024 05:43:18 +0100 [thread overview]
Message-ID: <20241209044318.GA180329@pevik> (raw)
In-Reply-To: <20241207085754.159597-1-liwang@redhat.com>
Hi Li, Cyril,
> The method adjusts the max_runtime for test cases by multiplying
> it by a factor (4x) if any debug kernel options are detected.
> Debug kernel configurations (such as CONFIG_KASAN, CONFIG_PROVE_LOCKING, etc.)
> are known to degrade performance, and this adjustment ensures
> that tests do not fail prematurely due to timeouts.
> As Cyril pointed out that a debug kernel will typically run
> slower by a factor of N, and while determining the exact value
> of N is challenging, so a reasonable upper bound is sufficient
> for practical purposes.
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
> 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
=> if you want to add more:
CONFIG_DEBUG_RSEQ=y
CONFIG_DEBUG_GPIO=y
CONFIG_DEBUG_RODATA_TEST=y
CONFIG_DEBUG_SHIRQ=y
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.
Which tests should I run on the kernel to see if timeout is ok?
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}
...
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-12-09 4:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 8:57 [LTP] [Patch V2] lib: multiply the max_runtime if detect kernel debug options Li Wang
2024-12-09 4:43 ` Petr Vorel [this message]
2024-12-09 6:36 ` Li Wang
2024-12-09 12:14 ` Petr Vorel
2024-12-09 14:02 ` Cyril Hrubis
2024-12-10 8:48 ` Li Wang
2024-12-10 8:58 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241209044318.GA180329@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.