From: Chao Liu <chao.liu@processmission.com>
To: Nam Cao <namcao@linutronix.de>
Cc: Gabriele Monaco <gmonaco@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] rv/rtapp: Add wakeup monitor
Date: Wed, 22 Jul 2026 12:45:22 +0800 [thread overview]
Message-ID: <amBHR4JTr2InJDk8@ChaodeMacBook-Pro.local> (raw)
In-Reply-To: <ba5658fa13e49ada466b84a2c211f233037180b5.1781852967.git.namcao@linutronix.de>
Hi Nam,
I've been looking into the RV subsystem, and while reading this patch
I noticed a small inconsistency.
On Fri, Jun 19, 2026 at 09:21:22AM +0800, Nam Cao wrote:
> Add a wakeup monitor to detect a lower-priority task waking up a
> higher-priority task.
>
> The rtapp/sleep monitor already detects this. However, that monitor
> triggers an error in the context of the wakee task and user only gets
> the stacktrace of that task. It is also extremely useful to get the
> stacktrace of the waker task, which this monitor offers. In other
> words, this monitor complements the rtapp/sleep monitor.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
[...]
> +Monitor wakeup
> +++++++++++++++
> +
> +The `wakeup` monitor reports real-time threads being woken by lower-priority threads,
> +which is a hint of priority inversion. Its specification is::
> +
> + RULE = always (((RT and USER_THREAD) imply
> + (not (WOKEN_BY_LOWER_PRIO or WOKEN_BY_SOFTIRQ)) or ALLOWLIST))
> +
> + ALLOWLIST = BLOCK_ON_RT_MUTEX
> + or FUTEX_LOCK_PI
> +
[...]
> +static void handle_sched_waking(void *data, struct task_struct *task)
> +{
> + if (in_task()) {
> + if (current->prio > task->prio)
> + ltl_atom_pulse(task, LTL_WOKEN_BY_LOWER_PRIO, true);
The implementation also reports wakeups from softirq context through
WOKEN_BY_SOFTIRQ:
> + } else if (in_serving_softirq()) {
> + ltl_atom_pulse(task, LTL_WOKEN_BY_SOFTIRQ, true);
> + }
Should this description mention softirq wakeups as well?
The Kconfig help text, struct rv_monitor's .description, and
MODULE_DESCRIPTION() seem to have the same omission.
I also have a small follow-up documentation patch based on this series,
which I plan to send as an RFC shortly.
Thanks,
Chao
next prev parent reply other threads:[~2026-07-22 4:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 7:21 [PATCH v2 0/4] rv: rtapp monitor update Nam Cao
2026-06-19 7:21 ` [PATCH v2 1/4] rv/rtapp/sleep: Make the error more informative for user Nam Cao
2026-07-01 12:26 ` Gabriele Monaco
2026-07-01 12:34 ` Gabriele Monaco
2026-06-19 7:21 ` [PATCH v2 2/4] rv/rtapp/sleep: Update nanosleep rule Nam Cao
2026-07-01 12:29 ` Gabriele Monaco
2026-06-19 7:21 ` [PATCH v2 3/4] rv/rtapp/sleep: Stop monitoring kernel threads Nam Cao
2026-07-01 13:02 ` Gabriele Monaco
2026-06-19 7:21 ` [PATCH v2 4/4] rv/rtapp: Add wakeup monitor Nam Cao
2026-07-01 13:11 ` Gabriele Monaco
2026-07-02 7:25 ` Nam Cao
2026-07-02 12:12 ` Gabriele Monaco
2026-07-22 4:45 ` Chao Liu [this message]
2026-07-22 7:42 ` Nam Cao
2026-07-22 9:29 ` Chao Liu
2026-07-22 9:36 ` Gabriele Monaco
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=amBHR4JTr2InJDk8@ChaodeMacBook-Pro.local \
--to=chao.liu@processmission.com \
--cc=gmonaco@redhat.com \
--cc=linux-doc@vger.kernel.org \
--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