From: Wen Yang <wen.yang@linux.dev>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: Nam Cao <namcao@linutronix.de>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/5] rv/reactors: export rv_register_reactor() and rv_unregister_reactor()
Date: Mon, 14 Sep 2026 00:33:17 +0800 [thread overview]
Message-ID: <2c408ff5-9a13-438e-9068-21b3f1516fbd@linux.dev> (raw)
In-Reply-To: <b5ec9da630968a5f801623c8d6e2aaeb0bb509d8.camel@redhat.com>
On 9/11/26 14:53, Gabriele Monaco wrote:
> On Mon, 2026-09-07 at 01:10 +0800, wen.yang@linux.dev wrote:
>> From: Wen Yang <wen.yang@linux.dev>
>>
>> rv_react() is exported to modules, but the reactor registration helpers
>> are not. Export them with EXPORT_SYMBOL_GPL() so reactor modules and
>> the tristate KUnit test module can register and unregister reactors
>> without hitting undefined symbol errors at link time(modpost).
>>
>> Commit 3d3800b4f7f4 ("rv: Remove reactor's reference counter") noted
>> that if module-based reactors are supported, try_module_get()/module_put()
>> should be used. Add struct module *owner to struct rv_reactor so a module
>> cat set owner = THIS_MODULE; pin the module in monitor_swap_reactors_gingle()
>> and release it when a monitor detaches or is unregistered.
>
> You needed these symbols in KUnit and we are exporting them for /potential/
> future support of reactors as modules. I don't see any technical reason why we
> shouldn't support this, but they are currently /not/ supported.
>
> I know sashiko and other LLMs complain about this, and they have a point, but
> you can ignore them. At most state in this commit message that this does NOT add
> support for reactors as modules.
>
> Let's focus this series on its original intent (fix a lockdep warning and add
> some KUnit tests that expose a reproducer), then if adding support for reactors
> as modules is so simple, you can do it in another series.
>
> If you really want to /also/ add support for reactors as modules in this series,
> you need to make that very explicit (not just a vague line in the changelog, but
> rather rewrite the entire cover letter and commit message).
> And mind that this would mean your series needs to go through another round of
> review and serious testing: you are adding a new feature.
>
Thanks for the review, Gabriele, I agree with your points and will
follow them.
Just to clarify the background : the struct module * field and the
try_module_get()/module_put() logic were added to address the point
raised by sashiko. After this change sashiko no longer complains about it.
The module-based reactor support, together with its kselftest, will be
send as a separate series in a few days.
As a side note, we are looking into using the rv framework for
functional safety in autonomous driving. Depending on how internal
validation progress, there will likely be further changes to the rv
subsystem in the near future. I'll be glad to discuss them as they come.
--
Best wishes,
Wen
next prev parent reply other threads:[~2026-09-13 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 17:10 [PATCH v5 0/5] rv/reactors: fix lockdep warning and add tests wen.yang
2026-09-06 17:10 ` [PATCH v5 1/5] rv/reactors: use LD_WAIT_SPIN as the reactor lockdep wait type wen.yang
2026-09-06 17:10 ` [PATCH v5 2/5] rv/reactors: propagate rv_register_reactor() error from reactor init wen.yang
2026-09-06 17:10 ` [PATCH v5 3/5] rv/reactors: export rv_register_reactor() and rv_unregister_reactor() wen.yang
2026-09-11 6:53 ` Gabriele Monaco
2026-09-13 16:33 ` Wen Yang [this message]
2026-09-06 17:10 ` [PATCH v5 4/5] rv/reactors: add KUnit tests for reactor registration and dispatch wen.yang
2026-09-06 17:10 ` [PATCH v5 5/5] selftests/verification: Test loadable module-based reactor wen.yang
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=2c408ff5-9a13-438e-9068-21b3f1516fbd@linux.dev \
--to=wen.yang@linux.dev \
--cc=gmonaco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=namcao@linutronix.de \
/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®