All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@redhat.com>
To: Wedson Almeida Filho <wedsonaf@gmail.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org, ojeda@kernel.org,
	alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net,
	bjorn3_gh@protonmail.com, benno.lossin@proton.me,
	a.hindborg@samsung.com, aliceryhl@google.com, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	rust-for-linux@vger.kernel.org, x86@kernel.org, lyude@redhat.com,
	pstanner@redhat.com, ajanulgu@redhat.com, airlied@redhat.com
Subject: Re: [PATCH v7 0/8] [RFC] Rust device / driver abstractions
Date: Wed, 27 Mar 2024 12:25:11 +0100	[thread overview]
Message-ID: <ZgQCF3jp73n4BTs4@pollux> (raw)
In-Reply-To: <CANeycqq=qETyG5ZwmKo0-iLehWeGVf_WqLf=OK3D1LN2yzYbCg@mail.gmail.com>

On Tue, Mar 26, 2024 at 09:48:07PM -0300, Wedson Almeida Filho wrote:
> On Mon, 25 Mar 2024 at 14:47, Danilo Krummrich <dakr@redhat.com> wrote:
> >
> > Hi,
> >
> > This patch series provides some initial Rust abstractions around the device /
> > driver model, including an abstraction for device private data.
> >
> > This patch series is sent in the context of [1] and is also available at [2].
> >
> > - Danilo
> >
> > [1] https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u
> > [2] https://github.com/Rust-for-Linux/linux/tree/staging/rust-device
> >
> > Danilo Krummrich (1):
> >   arch: x86: tools: increase symbol name size
> >
> > Wedson Almeida Filho (7):
> >   rust: device: Add a minimal RawDevice trait
> >   rust: device: Add a stub abstraction for devices
> >   rust: add driver abstraction
> >   rust: add rcu abstraction
> >   rust: add revocable mutex
> >   rust: add revocable objects
> >   rust: add device::Data
> 
> Danilo,
> 
> It seems like I'm the original author of the vast majority of the code
> in this RFC series, yet I wasn't contacted by you for coordination
> before you sent this.

Agree, it would have been better to directly contact you again.

Except for patches 2 & 3 the other ones are created from patches that
"extracted" code from the HEAD of R4L/rust. I just fixed authorship before
sending them, hence I think I didn't really notice that you are the original
author of all device / driver abstractions.

Please also note that I announced these efforts a couple of times, e.g. in [1]
and [2].

> 
> A bunch (all?) of these patches were already submitted upstream with a
> lot of discussion and decisions made to modify things. Why are you
> resubmitting them basically ignoring all previous discussions? Take
> patches 2 & 3 as examples (I don't bother to look for others now):
> 
> https://lore.kernel.org/lkml/20230224-rust-iopt-rtkit-v1-2-49ced3391295@asahilina.net/
> https://lore.kernel.org/lkml/20230224-rust-iopt-rtkit-v1-5-49ced3391295@asahilina.net/o

For the patches 2 & 3 I'm aware of the previous discussions. However, I have to
admit it's been a while since I read them and hence I forgot to mention that
this series is, besides others, also a follow up of that one.

For everything else I'm not aware of previous discussions, if there are any,
I'm sorry I missed them. Also please let me know if there are any, such that I
can follow up.

> 
> Also, these patches were written in the rust branch. Before we
> upstream them, we have to revisit them to check if changes are needed
> given the changes/improvements we have made; for example, pin init now
> allows us to initialise pinned objects safely -- we need to follow the
> new way now and I see that you don't in `RevocableMutex`. PinInit also
>  enables us to have pinned modules, which simplifies how we do
> registrations (so they also need to be updated), locks have been
> redone with a common `Lock` type, etc.

In [2] I was asking about the preferred way to get some immediate discussions
going. When I proposed to send links to the corresponding branches to the
mailing list or send a patch series (for rust-device I ended up doing both) I
did not hear any contradiction.

To me the mailing list seems to be a good place to revisit, review and improve
these patches.

I'd propose to just continue with this series and collaborate on improving it.
Are you fine with that?

- Danilo

[1] https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u
[2] https://rust-for-linux.zulipchat.com/#narrow/stream/415254-DRM/topic/Topic.20branches.20for.20staging.20Rust.20abstractions/near/426580539

> 
> In summary, we can't just copy code, we need to revisit some of it and
> at least check suitability before submitting them.
> 
> >  arch/x86/tools/insn_decoder_test.c |   2 +-
> >  rust/bindings/bindings_helper.h    |   1 +
> >  rust/helpers.c                     |  28 ++
> >  rust/kernel/device.rs              | 215 +++++++++++++
> >  rust/kernel/driver.rs              | 493 +++++++++++++++++++++++++++++
> >  rust/kernel/lib.rs                 |   6 +-
> >  rust/kernel/revocable.rs           | 438 +++++++++++++++++++++++++
> >  rust/kernel/sync.rs                |   3 +
> >  rust/kernel/sync/rcu.rs            |  52 +++
> >  rust/kernel/sync/revocable.rs      |  98 ++++++
> >  rust/macros/module.rs              |   2 +-
> >  samples/rust/rust_minimal.rs       |   2 +-
> >  samples/rust/rust_print.rs         |   2 +-
> >  13 files changed, 1337 insertions(+), 5 deletions(-)
> >  create mode 100644 rust/kernel/device.rs
> >  create mode 100644 rust/kernel/driver.rs
> >  create mode 100644 rust/kernel/revocable.rs
> >  create mode 100644 rust/kernel/sync/rcu.rs
> >  create mode 100644 rust/kernel/sync/revocable.rs
> >
> >
> > base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
> > --
> > 2.44.0
> >
> 


  reply	other threads:[~2024-03-27 11:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 17:47 [PATCH v7 0/8] [RFC] Rust device / driver abstractions Danilo Krummrich
2024-03-25 17:47 ` [PATCH v7 1/8] arch: x86: tools: increase symbol name size Danilo Krummrich
2024-03-25 17:52   ` Miguel Ojeda
2024-03-25 17:52 ` [PATCH v7 0/8] [RFC] Rust device / driver abstractions Danilo Krummrich
2024-03-27  0:48 ` Wedson Almeida Filho
2024-03-27 11:25   ` Danilo Krummrich [this message]
2024-03-27 13:31     ` Miguel Ojeda
2024-03-27 14:49       ` Danilo Krummrich
2024-03-27 16:30         ` Miguel Ojeda

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=ZgQCF3jp73n4BTs4@pollux \
    --to=dakr@redhat.com \
    --cc=a.hindborg@samsung.com \
    --cc=airlied@redhat.com \
    --cc=ajanulgu@redhat.com \
    --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=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=lyude@redhat.com \
    --cc=mingo@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=pstanner@redhat.com \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wedsonaf@gmail.com \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.