[Intel-gfx] [PATCH v7 2/5] drm/i915: Define and use GuC and CTB TLB invalidation routines
Andi Shyti
andi.shyti at linux.intel.com
Fri Oct 6 11:57:46 UTC 2023
Hi,
> > + /* Preallocate a shared id for use under memory pressure. */
> > + err = xa_alloc_cyclic_irq(&guc->tlb_lookup, &guc->serial_slot, wait,
> > + xa_limit_32b, &guc->next_seqno, GFP_KERNEL);
> > + if (err == -ENOMEM) {
> > + kfree(wait);
> > + return err;
> > + }
> What about any other error? Even if xa_alloc... is currently defined as not
> returning anything other than zero or ENOMEM, it is bad practice to assume
> that it can never produce any other error.
it can return -EBUSY when we run out of free spots. In such case
we neeed to wait a bit the queue to clear up.
Andi
More information about the Intel-gfx
mailing list