From: Yury Norov <yury.norov@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Danilo Krummrich" <dakr@redhat.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
linux-pm@vger.kernel.org,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Stephen Boyd" <sboyd@kernel.org>, "Nishanth Menon" <nm@ti.com>,
rust-for-linux@vger.kernel.org,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Erik Schilling" <erik.schilling@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Joakim Bech" <joakim.bech@linaro.org>,
"Rob Herring" <robh@kernel.org>, "Christoph Hellwig" <hch@lst.de>,
"Jason Gunthorpe" <jgg@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V8 04/14] rust: Add cpumask helpers
Date: Tue, 11 Feb 2025 11:24:55 -0500 [thread overview]
Message-ID: <Z6t51xodSV21ER4M@thinkpad> (raw)
In-Reply-To: <20250211042908.nyftiw7gtxosfjwc@vireshk-i7>
+ Jason, Christoph
On Tue, Feb 11, 2025 at 09:59:08AM +0530, Viresh Kumar wrote:
> On 10-02-25, 19:02, Yury Norov wrote:
> > On Thu, Feb 06, 2025 at 02:58:25PM +0530, Viresh Kumar wrote:
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index ee6709599df5..bfc1bf2ebd77 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -4021,6 +4021,7 @@ F: lib/cpumask_kunit.c
> > > F: lib/find_bit.c
> > > F: lib/find_bit_benchmark.c
> > > F: lib/test_bitmap.c
> > > +F: rust/helpers/cpumask.c
> >
> > Sorry what? I never committed to maintain this thing, and will
> > definitely not do it for free.
> >
> > NAK.
>
> Okay.
No, not Okay.
To begin with, this is the 8th version of the same patch, but you
only now bothered to CC someone who is listed in MAINTAINERS. This is
not how the community works.
You also made it a patch bomb that touches multiple critical and very
sensitive subsystems. You link them to an experimental and unstable
project, and do it in a way that makes it really easy to slip through
maintainers' attention.
Not speaking for others, but please for cpumasks create a separate
series and start thorough discussion.
> I will add a separate entry for Rust cpumask stuff.
That would make things even worse. Before you wanted me to maintain
rust linkage. Now you want me to get approval from someone else who
maintains rust linkage. In case I need to change something, I want to
be able to just change.
I went deeper into the subject, and found that rust team has similar
problems with other maintainers:
https://lore.kernel.org/lkml/20250108122825.136021-3-abdiel.janulgue@gmail.com/
I'm particularly concerned with the following comment from Jason
Gunthorpe:
All PRs to Linus must not break the rust build and the responsibilty
for that falls to all the maintainers. If the Rust team is not quick
enough to resolve any issues during the development window then
patches must be dropped before sending PRs, or Linus will refuse the
PR.
https://lore.kernel.org/lkml/20250130154646.GA2298732@nvidia.com/
And that happened at least once, right?
I don't expect that the functions you export now will get changed
anytime soon but it happens from time to time. cpumask_next_wrap()
is one recent example.
https://lore.kernel.org/netdev/20250128164646.4009-7-yury.norov@gmail.com/T/
The more drivers you write, the more functionality you will inevitably
pull. And the risk that something will get broken one day will grow
exponentially. So before we move forward, please explain in very details
how would you act in a scenario described by Jason?
Do you proactively run builds against development branches? If so,
please add my bitmap-for-next.
https://github.com/norov/linux/tree/bitmap-for-next
Have you considered creating a conftest, so that if rust fails to build
against the current kernel, it will get disabled until you fix the
issue?
Maybe you will just teach your language to understand inlines, and
that's it? Does it understand macros?
Thanks,
Yury
> > > +#ifndef CONFIG_CPUMASK_OFFSTACK
> > > +void rust_helper_free_cpumask_var(cpumask_var_t mask)
> > > +{
> > > + free_cpumask_var(mask);
> > > +}
> > > +#endif
> >
> > This is most likely wrong because free_cpumask_var() is declared
> > unconditionally, and I suspect the rust helper should be as well.
>
> Non-trivial C macros and inlined C functions cannot be used directly
> in the Rust code and are used via functions ("helpers") that wrap
> those so that they can be called from Rust.
>
> The free_cpumask_var() function is defined as inline only for the
> CONFIG_CPUMASK_OFFSTACK=n case and that's where we need this wrapper.
> For the other case (CONFIG_CPUMASK_OFFSTACK=y), Rust code can directly
> call free_cpumask_var() from the C code and we don't need this helper.
>
> > Please for the next iteration keep me CCed for the whole series. I
> > want to make sure you'll not make me a rust maintainer accidentally.
>
> Sure.
>
> --
> viresh
next prev parent reply other threads:[~2025-02-11 16:24 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 9:28 [PATCH V8 00/14] Rust bindings for cpufreq and OPP core + sample driver Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 01/14] rust: macros: enable use of hyphens in module names Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 02/14] cpufreq: Use enum for cpufreq flags that use BIT() Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 03/14] rust: cpu: Add from_cpu() Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 04/14] rust: Add cpumask helpers Viresh Kumar
2025-02-11 0:02 ` Yury Norov
2025-02-11 4:29 ` Viresh Kumar
2025-02-11 16:24 ` Yury Norov [this message]
2025-02-11 16:49 ` Jason Gunthorpe
2025-02-11 17:27 ` Danilo Krummrich
2025-02-11 21:37 ` Miguel Ojeda
2025-02-14 2:20 ` Yury Norov
2025-02-14 3:36 ` Viresh Kumar
2025-02-14 17:56 ` Miguel Ojeda
2025-02-14 19:11 ` Jason Gunthorpe
2025-02-14 20:24 ` Miguel Ojeda
2025-02-14 21:06 ` Jason Gunthorpe
2025-02-14 22:36 ` Miguel Ojeda
2025-02-15 9:55 ` Andreas Hindborg
2025-02-17 9:45 ` Philipp Stanner
2025-02-14 20:58 ` Miguel Ojeda
2025-02-12 7:34 ` Viresh Kumar
2025-02-15 10:16 ` Andreas Hindborg
2025-02-06 9:28 ` [PATCH V8 05/14] rust: Add bindings for cpumask Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 06/14] rust: Add bare minimal bindings for clk framework Viresh Kumar
2025-02-06 11:49 ` Danilo Krummrich
2025-02-06 11:52 ` Danilo Krummrich
2025-02-06 20:05 ` Stephen Boyd
2025-02-06 23:11 ` Danilo Krummrich
2025-02-07 9:24 ` Viresh Kumar
2025-02-07 10:43 ` Viresh Kumar
2025-02-07 17:19 ` Danilo Krummrich
2025-02-10 8:06 ` Viresh Kumar
2025-02-10 22:07 ` Stephen Boyd
2025-02-17 12:19 ` Daniel Almeida
2025-02-21 6:35 ` Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 07/14] rust: Add initial bindings for OPP framework Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 08/14] rust: Extend OPP bindings for the OPP table Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 09/14] rust: Extend OPP bindings for the configuration options Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 10/14] rust: Add initial bindings for cpufreq framework Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 11/14] rust: Extend cpufreq bindings for policy and driver ops Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 12/14] rust: Extend cpufreq bindings for driver registration Viresh Kumar
2025-02-06 12:04 ` Danilo Krummrich
2025-02-06 12:06 ` Alice Ryhl
2025-02-07 9:15 ` Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 13/14] rust: Extend OPP bindings with CPU frequency table Viresh Kumar
2025-02-06 9:28 ` [PATCH V8 14/14] cpufreq: Add Rust based cpufreq-dt driver Viresh Kumar
2025-02-06 11:45 ` [PATCH V8 00/14] Rust bindings for cpufreq and OPP core + sample driver Danilo Krummrich
2025-02-07 7:15 ` Viresh Kumar
2025-02-07 11:07 ` Miguel Ojeda
2025-02-10 8:06 ` Viresh Kumar
2025-02-17 8:39 ` Miguel Ojeda
2025-02-17 10:18 ` Viresh Kumar
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=Z6t51xodSV21ER4M@thinkpad \
--to=yury.norov@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.bennee@linaro.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@redhat.com \
--cc=erik.schilling@linaro.org \
--cc=gary@garyguo.net \
--cc=hch@lst.de \
--cc=jgg@nvidia.com \
--cc=joakim.bech@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=manos.pitsidianakis@linaro.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nm@ti.com \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tmgross@umich.edu \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).