public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
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 13:14:58 +0100	[thread overview]
Message-ID: <20241209121458.GB210779@pevik> (raw)
In-Reply-To: <CAEemH2fSJP8Y8-CLbtKFq+PUcmP_3=aF8Wszom-bDfP6=HOCjg@mail.gmail.com>

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-12-09 12:15 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
2024-12-09  6:36   ` Li Wang
2024-12-09 12:14     ` Petr Vorel [this message]
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=20241209121458.GB210779@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox