rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Boqun Feng" <boqun.feng@gmail.com>
Cc: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Lyude Paul" <lyude@redhat.com>,
	"Guangbo Cui" <2407018371@qq.com>,
	"Dirk Behme" <dirk.behme@gmail.com>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@gmail.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Miguel Ojeda" <ojeda@kernel.org>
Subject: Re: [PATCH v9 01/13] rust: hrtimer: introduce hrtimer support
Date: Mon, 24 Feb 2025 19:58:04 +0100	[thread overview]
Message-ID: <87msebyxtv.fsf@kernel.org> (raw)
In-Reply-To: <Z7yl-LsSkVIDAfMF@Mac.home> (Boqun Feng's message of "Mon, 24 Feb 2025 09:01:44 -0800")

"Boqun Feng" <boqun.feng@gmail.com> writes:

> On Mon, Feb 24, 2025 at 05:45:03PM +0100, Miguel Ojeda wrote:
>> On Mon, Feb 24, 2025 at 5:31 PM Boqun Feng <boqun.feng@gmail.com> wrote:
>> >
>> > On Mon, Feb 24, 2025 at 05:23:59PM +0100, Miguel Ojeda wrote:
>> > >
>> > > side -- Andreas and I discussed it the other day. The description of
>> > > the issue has some lines, but perhaps the commit message could
>> >
>> > Do you have a link to the issue?
>>
>> Sorry, I meant "description of the symbol", i.e. the description field
>> in the patch.
>>
>
> Oh, I see. Yes, the patch description should provide more information
> about what the kconfig means for hrtimer maintainers' development.

Right, I neglected to update the commit message. I will do that if we
have another version.

>
>> > I asked because hrtimer API is always available regardless of the
>> > configuration, and it's such a core API, so it should always be there
>> > (Rust or C).
>>
>> It may not make sense for something that is always built on the C
>> side, yeah. I think the intention here may be that one can easily
>> disable it while "developing" a change on the C side. I am not sure
>> what "developing" means here, though, and we need to be careful --
>> after all, Kconfig options are visible to users and they do not care
>> about that.
>>
>
> Personally, I don't think CONFIG_RUST_HRTIMER is necessarily because as
> you mentioned below, people can disable Rust entirely during
> "developing".
>
> And if I understand the intention correctly, the CONFIG_RUST_HRTIMER
> config provides hrtimer maintainers a way that they could disable Rust
> hrtimer abstraction (while enabling other Rust component) when they're
> developing a change on the C side, right? If so, it's hrtimer
> maintainers' call, and this patch should provide more information on
> this.
>
> Back to my personal opinion, I don't think this is necessary ;-)
> Particularly because I can fix if something breaks Rust side, and I'm
> confident and happy to do so for hrtimer ;-)

As Miguel said, the idea for this came up in the past week in one of the
mega threads discussing rust in general. We had a lot of "what happens
if I change something in my subsystem and that breaks rust" kind of
discussions.

For subsystems where the people maintaining the C subsystem is not the
same people maintaining the Rust abstractions, this switch might be
valuable. It would allow making breaking changes to the C code of a
subsystem without refactoring the Rust code in the same sitting. Rather
than having to disable rust entirely - or going and commenting out lines
in the kernel crate - I think it is better to provide an option to just
disable building these particular bindings.

This has nothing to do with general policies related to breakage between
Rust and C code, and how to fix such breakage in a timely manner. It is
simply a useful switch for disabling part of the build so that people
can move on with their business, while someone else scrambles to fix
whatever needs fixing on the Rust side.

I am of course also available to fix anything that would eventually
break. In fact, I expect to be able to catch breakage most of the time
automatically and very early by means of automatically monitoring the
relevant trees. I do this for block, and it has worked really well since
rust code was merged in that subsystem.


Best regards,
Andreas Hindborg






  reply	other threads:[~2025-02-24 18:58 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 12:03 [PATCH v9 00/13] hrtimer Rust API Andreas Hindborg
2025-02-24 12:03 ` [PATCH v9 01/13] rust: hrtimer: introduce hrtimer support Andreas Hindborg
2025-02-24 13:19   ` Andreas Hindborg
2025-02-24 15:46     ` Boqun Feng
2025-02-24 16:23       ` Miguel Ojeda
2025-02-24 16:31         ` Boqun Feng
2025-02-24 16:45           ` Miguel Ojeda
2025-02-24 17:01             ` Boqun Feng
2025-02-24 18:58               ` Andreas Hindborg [this message]
2025-02-24 19:18                 ` Boqun Feng
2025-02-24 19:52                   ` Andreas Hindborg
2025-02-24 20:22                     ` Boqun Feng
2025-02-25  5:50                       ` Andreas Hindborg
2025-02-26 16:31                     ` Frederic Weisbecker
2025-02-26 19:41                       ` Andreas Hindborg
2025-02-24 20:04   ` Tamir Duberstein
2025-02-25  8:52     ` Andreas Hindborg
2025-02-25 15:37       ` Tamir Duberstein
2025-02-25 19:12         ` Andreas Hindborg
2025-02-25 20:13           ` Tamir Duberstein
2025-02-26 11:48             ` Andreas Hindborg
2025-02-26 15:29               ` Tamir Duberstein
2025-03-07  9:09                 ` Andreas Hindborg
2025-02-25 11:36   ` Markus Elfring
2025-02-25 12:13     ` Andreas Hindborg
2025-02-27  8:31   ` Thomas Gleixner
2025-02-27 10:44     ` Andreas Hindborg
2025-02-24 12:03 ` [PATCH v9 02/13] rust: sync: add `Arc::as_ptr` Andreas Hindborg
2025-02-24 12:03 ` [PATCH v9 03/13] rust: hrtimer: implement `HrTimerPointer` for `Arc` Andreas Hindborg
2025-02-24 23:13   ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 04/13] rust: hrtimer: allow timer restart from timer handler Andreas Hindborg
2025-02-24 23:23   ` Lyude Paul
2025-02-25  8:58     ` Andreas Hindborg
2025-02-25 21:46       ` Lyude Paul
2025-02-26 13:43         ` Andreas Hindborg
2025-02-26 19:26           ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 05/13] rust: hrtimer: add `UnsafeHrTimerPointer` Andreas Hindborg
2025-02-24 23:24   ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 06/13] rust: hrtimer: add `hrtimer::ScopedHrTimerPointer` Andreas Hindborg
2025-02-24 23:25   ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 07/13] rust: hrtimer: implement `UnsafeHrTimerPointer` for `Pin<&T>` Andreas Hindborg
2025-02-24 23:32   ` Lyude Paul
2025-02-25  9:01     ` Andreas Hindborg
2025-02-24 12:03 ` [PATCH v9 08/13] rust: hrtimer: implement `UnsafeHrTimerPointer` for `Pin<&mut T>` Andreas Hindborg
2025-02-24 23:33   ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 09/13] rust: alloc: add `Box::into_pin` Andreas Hindborg
2025-02-24 23:34   ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 10/13] rust: hrtimer: implement `HrTimerPointer` for `Pin<Box<T>>` Andreas Hindborg
2025-02-24 23:37   ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 11/13] rust: hrtimer: add `HrTimerMode` Andreas Hindborg
2025-02-24 23:40   ` Lyude Paul
2025-02-25  9:04     ` Andreas Hindborg
2025-02-25 21:49       ` Lyude Paul
2025-02-24 12:03 ` [PATCH v9 12/13] rust: hrtimer: add clocksource selection through `ClockSource` Andreas Hindborg
2025-02-24 23:42   ` Lyude Paul
2025-02-27  9:11   ` Thomas Gleixner
2025-02-27  9:24     ` Thomas Gleixner
2025-02-27 11:18     ` Andreas Hindborg
2025-02-27 14:22       ` Thomas Gleixner
2025-02-27 16:03         ` Andreas Hindborg
2025-02-24 12:03 ` [PATCH v9 13/13] rust: hrtimer: add maintainer entry Andreas Hindborg
2025-02-24 15:44   ` Boqun Feng
2025-02-26 16:17     ` Frederic Weisbecker
2025-02-26 19:42       ` Andreas Hindborg
2025-02-26 19:49       ` Lyude Paul
2025-02-26 21:08         ` Andreas Hindborg
2025-02-27  9:12       ` Thomas Gleixner
2025-02-27 10:45         ` Andreas Hindborg
2025-02-24 23:43   ` Lyude Paul

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=87msebyxtv.fsf@kernel.org \
    --to=a.hindborg@kernel.org \
    --cc=2407018371@qq.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=anna-maria@linutronix.de \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dirk.behme@gmail.com \
    --cc=frederic@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tmgross@umich.edu \
    /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).