On Mon, Feb 04, 2019 at 02:17:49PM -0700, Jason Gunthorpe wrote: > + * The add/remove callbacks must be called in FIFO/LIFO order. To > + * achieve this we assign client_ids so they are sorted in > + * registration order, and retain a linked list we can reverse iterate > + * to get the LIFO order. The extra linked list can go away if xarray > + * learns to reverse iterate. I've just been waiting for a customer to add an xa_for_each_rev() ;-) I'll put it on the todo list ... unless someone else wants to do it first.