[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ-ks9k7Jn=8K1a0QeDK-vhTWO8-dv_bkw2SJm3EEUsinMTFQA@mail.gmail.com>
Date: Tue, 1 Jul 2025 13:04:04 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Andreas Hindborg <a.hindborg@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
Matthew Wilcox <willy@...radead.org>, Andrew Morton <akpm@...ux-foundation.org>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
Daniel Almeida <daniel.almeida@...labora.com>
Subject: Re: [PATCH 3/3] rust: xarray: add `insert` and `reserve`
On Tue, Jul 1, 2025 at 12:56 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Tue, Jul 1, 2025 at 6:27 PM Tamir Duberstein <tamird@...il.com> wrote:
> >
> > Add `Guard::{insert,reserve}` and `Guard::{insert,reserve}_limit`, which
> > are akin to `__xa_{alloc,insert}` in C.
>
> Who will be using this? i.e. we need to justify adding code, typically
> by mentioning the users.
Daniel, could you name your use case?
Alice, could you confirm whether rust binder needs this or not?
Andreas, did you also need this?
> By the way, it may help splitting the C parts into its own patch, so
> that Matthew can focus on that (but maybe you all already discussed
> this).
Happy to do so if it makes Matthew's life easier, but I'd prefer to
keep it together so the motivation is clearer in the git log. Matthew:
any preference?
> Also, unit tests are great, thanks for adding those. Can we add
> examples as well? Maybe on the module-level docs, given the rest are
> there.
Will do. I ported all the examples to unit tests now that we have
kunit, but I'll bring some examples back.
>
> > + /// Wrapper around `__xa_alloc`.
>
> We try to mention what something does in the title at least, even if
> it is just copied from the C docs -- you can reference those docs too
> for more context, e.g. [`__xa_alloc`] to:
>
> https://docs.kernel.org/core-api/xarray.html#c.__xa_alloc
👍
Powered by blists - more mailing lists