Re: [PATCH] rust: bitmap: encourage using xarray/maple_tree instead of id_pool

Burak Emir <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <CABwQupMNO5mdq+nSg-gpMcgatnG0P=XYJN-bH96Jjzs-_b-6BQ@mail.gmail.com>
On Sat, Jul 11, 2026 at 3:13 PM Alice Ryhl <[email protected]> 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/[email protected]/
> Link: https://lore.kernel.org/rust-for-linux/[email protected]/
> Signed-off-by: Alice Ryhl <[email protected]>

Reviewed-by: Burak Emir <[email protected]>

Looks good. I built, ran the tests and checked the rustdoc.

cheers,
Burak
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.