On Mon, Jul 06, 2026 at 12:53:24PM +0100, Gary Guo wrote: > On Mon Jul 6, 2026 at 12:48 PM BST, Alice Ryhl wrote: > > On Fri, Jul 03, 2026 at 07:16:03PM +0900, Eliot Courtney wrote: > >> Add support for reserving of ranges of IDs, with a usage in nova-core > >> for channel IDs. This entails adding the helpers+users of the C bitmap > >> API for ranges of bits, then users of that in `IdPool`, and finally a > >> user of `IdPool` in nova-core, `ChannelIdPool`. > > > > If you need ranges of IDs, perhaps you want the maple tree instead? > > > > Alice > > Any reason that the current ID pool is implemented directly on top of bitmap > rather than using IDA?
To some extent it's because that's how C Binder did it. Though I do also think that the bitmap fits binder's needs pretty well. Almost no Binder processes will have more than 8 handles in use, in which case the BitmapVec is extremely efficient because no allocation or pointer indirection is used. And the bitmap also performs well for the few processes with many external handles. But it could also use the xarray instead. Nothing stopping that. Alice
