From: Andrew Ballance <andrewjballance@gmail.com>
To: willy@infradead.org
Cc: Liam.Howlett@oracle.com, a.hindborg@kernel.org,
akpm@linux-foundation.org, alex.gaynor@gmail.com,
aliceryhl@google.com, andrewjballance@gmail.com,
benno.lossin@proton.me, bjorn3_gh@protonmail.com,
boqun.feng@gmail.com, brauner@kernel.org, dakr@kernel.org,
dingxiangfei2009@gmail.com, gary@garyguo.net,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, maple-tree@lists.infradead.org,
ojeda@kernel.org, rust-for-linux@vger.kernel.org,
tmgross@umich.edu, wedsonaf@gmail.com
Subject: Re: [RFC PATCH 1/2] maple_tree: add __mtree_insert_range function
Date: Sun, 6 Apr 2025 04:30:08 -0500 [thread overview]
Message-ID: <20250406093008.1655905-1-andrewjballance@gmail.com> (raw)
In-Reply-To: <Z_FKugtgoN0l6JNm@casper.infradead.org>
On Sat, Apr 05, 2025 at 04:22:34PM +0100, Matthew Wilcox wrote:
> On Sat, Apr 05, 2025 at 01:01:53AM -0500, Andrew Ballance wrote:
> > adds the __mtree_insert_range which is identical to mtree_insert_range
> > but does not aquire ma_lock.
> > This function is needed for the rust bindings for maple trees because
> > the locking is handled on the rust side.
>
> No.
>
> The support for external locking is a TEMPORARY HACK. I've talked
> before about why this is and don't feel like explaining it again.
this does use the maple_tree's internal ma_lock. the locking is
done on the rust side using bindings to mtree_lock(). it is done this
way so that rust can track the lifetimes of any values from mtree_load.
the easiest way to do this was to add code to the c side.
for the v2 I can make changes so that this does not touch the c side.
next prev parent reply other threads:[~2025-04-06 9:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-05 6:01 [RFC PATCH 0/2] rust: add support for maple trees Andrew Ballance
2025-04-05 6:01 ` [RFC PATCH 1/2] maple_tree: add __mtree_insert_range function Andrew Ballance
2025-04-05 15:22 ` Matthew Wilcox
2025-04-05 18:38 ` Boqun Feng
2025-04-06 9:30 ` Andrew Ballance [this message]
2025-04-05 6:01 ` [RFC PATCH 2/2] rust: add maple tree abstractions Andrew Ballance
2025-04-05 15:23 ` Miguel Ojeda
2025-04-07 13:59 ` Liam R. Howlett
2025-04-07 20:02 ` Andrew Ballance
2025-04-08 1:36 ` Liam R. Howlett
2025-04-14 18:27 ` Danilo Krummrich
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=20250406093008.1655905-1-andrewjballance@gmail.com \
--to=andrewjballance@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=a.hindborg@kernel.org \
--cc=akpm@linux-foundation.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=brauner@kernel.org \
--cc=dakr@kernel.org \
--cc=dingxiangfei2009@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=wedsonaf@gmail.com \
--cc=willy@infradead.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