"Philipp Stanner" <[email protected]> writes: > One often cannot allocate in the kernel with the desired flags, most > notably in atomic context. Pre-allocating the memory is the preferred > solution in such situations. > > Add support for xa_reserve() in the Rust abstractions of xarray. Create > a Reservation object similar to a lock-guard, that can be dropped once > the reservation is no longer needed or once the index was stored to. > > Signed-off-by: Philipp Stanner <[email protected]> > --- > Please regard this more as an RFC. > > I need pre-allocating in XArray for DmaFence. How exactly we achieve > this is open for discussion.
Do you need to actually reserve a key, or do you just need atomic allocation? I have a series that solves the allocation issue here [1]. Tamir did a reservation API a while back [2]. Best regards, Andreas Hindborg [1] https://lore.kernel.org/r/[email protected] [2] https://lore.kernel.org/r/[email protected]

