Re: [PATCH] rust: bitmap: encourage using xarray/maple_tree instead of id_pool
From: Burak Emir
Date: Sat Jul 18 2026 - 17:17:09 EST
On Sat, Jul 11, 2026 at 3:13 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> The id_pool.rs file was added for use in the Binder driver, which is
> using a bitmap rather than the normal IDR implementation due its
> specialized needs and performance/spinlock requirements. However, its
> current name as kernel::id_pool encourages using it over other IDR
> solutions.
>
> To discourage choosing this pool when you don't need it, move it to
> kernel::bitmap and add a comment recommending the xarray or maple tree
> for generic IDR use-cases.
>
> Please see the below links for the discussion that prompted moving this
> file.
>
> Link: https://lore.kernel.org/rust-for-linux/2026070334-dollar-hexagram-e49c@gregkh/
> Link: https://lore.kernel.org/rust-for-linux/84bc8bd2-e292-4b84-9580-a1b5df4c5bdc@xxxxxxxxxx/
> Link: https://lore.kernel.org/rust-for-linux/20260711063602.426311-1-ynorov@xxxxxxxxxx/
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Reviewed-by: Burak Emir <burak.emir@xxxxxxxxx>
Looks good. I built, ran the tests and checked the rustdoc.
cheers,
Burak