[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250406093008.1655905-1-andrewjballance@gmail.com>
Date: Sun, 6 Apr 2025 04:30:08 -0500
From: Andrew Ballance <andrewjballance@...il.com>
To: willy@...radead.org
Cc: Liam.Howlett@...cle.com,
a.hindborg@...nel.org,
akpm@...ux-foundation.org,
alex.gaynor@...il.com,
aliceryhl@...gle.com,
andrewjballance@...il.com,
benno.lossin@...ton.me,
bjorn3_gh@...tonmail.com,
boqun.feng@...il.com,
brauner@...nel.org,
dakr@...nel.org,
dingxiangfei2009@...il.com,
gary@...yguo.net,
gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
maple-tree@...ts.infradead.org,
ojeda@...nel.org,
rust-for-linux@...r.kernel.org,
tmgross@...ch.edu,
wedsonaf@...il.com
Subject: Re: [RFC PATCH 1/2] maple_tree: add __mtree_insert_range function
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.
Powered by blists - more mailing lists