From: Gabriele Monaco <gmonaco@redhat.com>
To: Nam Cao <namcao@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
linux-trace-kernel@vger.kernel.org,
linux-kernel@vger.kernel.org, john.ogness@linutronix.de
Subject: Re: [PATCH v8 20/22] rv: Add rtapp_sleep monitor
Date: Mon, 19 May 2025 09:54:52 +0200 [thread overview]
Message-ID: <bd35a5165cb01450e799f025e8faaaa8a36ad51a.camel@redhat.com> (raw)
In-Reply-To: <20250519070425.xDEPNyBe@linutronix.de>
On Mon, 2025-05-19 at 09:04 +0200, Nam Cao wrote:
> On Fri, May 16, 2025 at 04:31:03PM +0000, Gabriele Monaco wrote:
> > 2025-05-12T10:56:30Z Nam Cao <namcao@linutronix.de>:
> > > diff --git a/kernel/trace/rv/monitors/sleep/Kconfig
> > > b/kernel/trace/rv/monitors/sleep/Kconfig
> > > new file mode 100644
> > > index 000000000000..d00aa1aae069
> > > --- /dev/null
> > > +++ b/kernel/trace/rv/monitors/sleep/Kconfig
> > > @@ -0,0 +1,13 @@
> > > +# SPDX-License-Identifier: GPL-2.0-only
> > > +#
> > > +config RV_MON_SLEEP
> > > + depends on RV
> > > + select RV_LTL_MONITOR
> > > + depends on HAVE_SYSCALL_TRACEPOINTS
> > > + depends on RV_MON_RTAPP
> > > + select TRACE_IRQFLAGS
> >
> > I had a different approach towards those (the preemptirq
> > tracepoints)
> > under the assumption adding them introduces latency. Besides me
> > picking
> > the wrong config (I used IRQSOFF, I'll fix that) I considered the
> > monitor
> > should /depend/ on the tracepoint instead of select it.
> >
> > This way it looks easier to me to avoid making a change that
> > introduces
> > latency slip in when distribution maintainers enable the monitor
> > (e.g.
> > TRACE_IRQFLAGS may be enabled on debug kernels and using depends
> > would
> > automatically prevent the monitor on non-debug kernels).
> >
> > Now is this concern justified? Is it only a performance issue for
> > the
> > preempt tracepoint or not even there? I'd like to keep consistency
> > but I
> > really can't decide on which approach is better.
>
> Both approach is fine, I don't have a strong preference.
>
> I doubt that the distribution people would carelessly enable anything
> new,
> and these monitors are disabled by default. So I wouldn't worry too
> much.
>
Yeah that's true, I still see dependency makes their life mildly
easier, but as long as it's clear this type of monitor can affect
performance, both solutions work.
> I will do some measurements on the runtime impact of having these
> monitors
> built, so that there will be a recommendation whether to enable them
> in
> distribution kernel. But for now, just like any other debug configs,
> people
> should expect some performance hit.
>
Fair enough. We did some tests internally showing noticeable latency
increases with /both/ preempt and irq tracepoints enabled but didn't
perform tests with the irq one alone.
Nevertheless, I'd say a note saying enabling compilation of the monitor
may affect performance even when the monitor is off would do the job
(or anything along the line as you see fit).
Currently RV should not really affect the system when compiled in but
disabled, so I'd make it clear when that happens.
> > Also curiosity on my side (I didn't try), you require
> > TRACE_IRQFLAGS to
> > use hardirq_context but how different is it from in_hardirq() in
> > your
> > case?
>
> There is a wake_timersd() in __irq_exit_rcu(). This is a wakeup
> performed
> within interrupt handling, but in_hardirq() doesn't say that.
>
Alright, got it.
Thanks,
Gabriele
next prev parent reply other threads:[~2025-05-19 7:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 10:50 [PATCH v8 00/22] RV: Linear temporal logic monitors for RT application Nam Cao
2025-05-12 10:50 ` [PATCH v8 01/22] rv: Add #undef TRACE_INCLUDE_FILE Nam Cao
2025-05-12 10:50 ` [PATCH v8 02/22] printk: Make vprintk_deferred() public Nam Cao
2025-05-12 10:50 ` [PATCH v8 03/22] panic: Add vpanic() Nam Cao
2025-05-12 10:50 ` [PATCH v8 04/22] rv: Let the reactors take care of buffers Nam Cao
2025-05-12 10:50 ` [PATCH v8 05/22] verification/dot2k: Make a separate dot2k_templates/Kconfig_container Nam Cao
2025-05-12 10:50 ` [PATCH v8 06/22] verification/dot2k: Remove __buff_to_string() Nam Cao
2025-05-12 10:50 ` [PATCH v8 07/22] verification/dot2k: Replace is_container() hack with subparsers Nam Cao
2025-05-12 10:50 ` [PATCH v8 08/22] rv: rename CONFIG_DA_MON_EVENTS to CONFIG_RV_MON_EVENTS Nam Cao
2025-05-12 10:50 ` [PATCH v8 09/22] verification/dot2k: Prepare the frontend for LTL inclusion Nam Cao
2025-05-12 10:50 ` [PATCH v8 10/22] Documentation/rv: Prepare monitor synthesis document " Nam Cao
2025-05-12 10:50 ` [PATCH v8 11/22] verification/rvgen: Restructure the templates files Nam Cao
2025-05-12 10:50 ` [PATCH v8 12/22] verification/rvgen: Restructure the classes to prepare for LTL inclusion Nam Cao
2025-05-12 10:50 ` [PATCH v8 13/22] rv: Add support for LTL monitors Nam Cao
2025-05-12 10:50 ` [PATCH v8 14/22] rv: Add rtapp container monitor Nam Cao
2025-05-12 10:50 ` [PATCH v8 15/22] x86/tracing: Remove redundant trace_pagefault_key Nam Cao
2025-05-12 10:50 ` [PATCH v8 16/22] x86/tracing: Move page fault trace points to generic Nam Cao
2025-05-12 10:51 ` [PATCH v8 17/22] arm64: mm: Add page fault trace points Nam Cao
2025-05-19 14:49 ` Catalin Marinas
2025-05-20 12:25 ` Nam Cao
2025-05-20 14:15 ` Catalin Marinas
2025-05-21 9:03 ` Nam Cao
2025-05-12 10:51 ` [PATCH v8 18/22] riscv: " Nam Cao
2025-05-12 10:51 ` [PATCH v8 19/22] rv: Add rtapp_pagefault monitor Nam Cao
2025-05-12 10:51 ` [PATCH v8 20/22] rv: Add rtapp_sleep monitor Nam Cao
2025-05-16 16:31 ` Gabriele Monaco
2025-05-19 7:04 ` Nam Cao
2025-05-19 7:54 ` Gabriele Monaco [this message]
2025-05-12 10:51 ` [PATCH v8 21/22] rv: Add documentation for rtapp monitor Nam Cao
2025-05-12 10:51 ` [PATCH v8 22/22] rv: Allow to configure the number of per-task monitor Nam Cao
2025-05-16 8:21 ` [PATCH v8 00/22] RV: Linear temporal logic monitors for RT application Ingo Molnar
2025-05-16 8:55 ` Nam Cao
2025-05-16 9:07 ` Nam Cao
2025-05-16 9:12 ` Ingo Molnar
2025-08-10 21:12 ` patchwork-bot+linux-riscv
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=bd35a5165cb01450e799f025e8faaaa8a36ad51a.camel@redhat.com \
--to=gmonaco@redhat.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=namcao@linutronix.de \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®