Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: wen.yang@linux.dev
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/4] rv/reactors: use LD_WAIT_SPIN as the reactor lockdep wait type
Date: Thu, 27 Aug 2026 18:36:55 +0000	[thread overview]
Message-ID: <20260827183655.6EE191F000E9@smtp.kernel.org> (raw)
In-Reply-To: <7bfe97bd497a2641de36b35e17f69e6f3f291c2a.1787854397.git.wen.yang@linux.dev>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The documentation for reactor locking rules was added to the wrong file (`monitor_synthesis.rst` instead of `runtime-verification.rst`), causing an inconsistency between the commit message, source code comments, and the actual documentation.
--

commit 26073218a7c3b83225869704d414a262b5e15e47
Author: Wen Yang <wen.yang@linux.dev>

rv/reactors: use LD_WAIT_SPIN as the reactor lockdep wait type

This commit changes the lockdep wait type override in rv_react() from
LD_WAIT_FREE to LD_WAIT_SPIN to prevent spurious "Invalid wait context"
warnings. It also adds documentation explaining the reactor locking rules.

> diff --git a/Documentation/trace/rv/monitor_synthesis.rst b/Documentation/trace/rv/monitor_synthesis.rst
> index 2c1b5a0ae1545..aab4b0342d5f5 100644
> --- a/Documentation/trace/rv/monitor_synthesis.rst
> +++ b/Documentation/trace/rv/monitor_synthesis.rst
> @@ -365,6 +365,26 @@ but higher overhead. The timer wheel (``HA_TIMER_WHEEL``) is a good alternative
>  for monitors with several instances (e.g. per-task) that achieves lower
>  overhead with increased latency, yet without compromising precision.
>  
> +Reactors
> +--------
> +
> +A reactor is a callback triggered by a monitor when a violation is
> +detected. Reactors are registered via ``/sys/kernel/tracing/rv/reactors/``
> +and enabled per monitor.
> +
> +Reactor Locking Rules
> +++++++++++++++++++++

[ ... ]

> diff --git a/kernel/trace/rv/rv_reactors.c b/kernel/trace/rv/rv_reactors.c
> index 2f5fc8d18dea4..afc97d0971091 100644
> --- a/kernel/trace/rv/rv_reactors.c
> +++ b/kernel/trace/rv/rv_reactors.c
> @@ -465,7 +465,11 @@ int init_rv_reactors(struct dentry *root_dir)
>  
>  void rv_react(struct rv_monitor *monitor, const char *msg, ...)
>  {
> -	static DEFINE_WAIT_OVERRIDE_MAP(rv_react_map, LD_WAIT_FREE);
> +	/*
> +	 * Use LD_WAIT_SPIN uniformly for deterministic lockdep checking.
> +	 * See Documentation/trace/rv/runtime-verification.rst.
> +	 */

[Severity: Low]
Is the documentation for reactor locking rules added to the wrong file?

The comment added here in rv_react() points to
Documentation/trace/rv/runtime-verification.rst for the explanation of the
LD_WAIT_SPIN override. However, the documentation was actually added to
Documentation/trace/rv/monitor_synthesis.rst.

Could the comment or the file location be updated so readers following the
code comment will look in the correct documentation file?

> +	static DEFINE_WAIT_OVERRIDE_MAP(rv_react_map, LD_WAIT_SPIN);
>  	va_list args;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1787854397.git.wen.yang@linux.dev?part=1

  reply	other threads:[~2026-08-27 18:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 18:22 [PATCH v4 0/4] rv/reactors: fix lockdep warning and add KUnit tests wen.yang
2026-08-27 18:22 ` [PATCH v4 1/4] rv/reactors: use LD_WAIT_SPIN as the reactor lockdep wait type wen.yang
2026-08-27 18:36   ` sashiko-bot [this message]
2026-08-31  9:48   ` Gabriele Monaco
2026-08-27 18:22 ` [PATCH v4 2/4] rv/reactors: propagate rv_register_reactor() error from reactor init wen.yang
2026-08-27 18:22 ` [PATCH v4 3/4] rv/reactors: export rv_register_reactor() and rv_unregister_reactor() wen.yang
2026-08-27 18:48   ` sashiko-bot
2026-08-27 18:22 ` [PATCH v4 4/4] rv/reactors: add KUnit tests for reactor registration and dispatch wen.yang
2026-08-27 19:02   ` sashiko-bot

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=20260827183655.6EE191F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wen.yang@linux.dev \
    /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