On Wed Feb 11, 2026 at 4:20 PM CET, Philipp Stanner wrote: > On Wed, 2026-02-11 at 15:17 +0000, Alice Ryhl wrote: >> On Wed, Feb 11, 2026 at 03:07:38PM +0100, Boris Brezillon wrote: >> > >> > Back to this particular job dependencies use case: we have to embed the >> > DmaFence pointer in some wrapper with the ListLinks element anyway, >> > because DmaFences can be inserted in multiple of those lists in >> > parallel. >> >> Okay, if that's the case, then the linked list is *really* not the right >> tool for the job. > > We have to distinguish what we are talking about here. > > For the JobQueue, it takes over a cloned DmaFence and stuffs that into > its own list. Problem solved.
You mean it wraps the ARef<DmaFence> into a struct Dependency which has its own ListLinks. But this requires an additional allocation for every dependency, whereas with xarray you can just store the pointer directly in the xarray with ARef::into_raw(). I.e. it scales much better than lists for this use-case.
