Hi Christian & Chris
two question regarding resv:
1) considering below sequence:
now assume old->shared_count is now 3
now assume old->shared_count is now 4,
now obj->staged is new allocated, and its shared_max = 8, but not
used by far.
it set obj->fence->shared_count to 0, and put all shared fence from obj->fence
without waiting signaling.
(this action looks inappropriate, I think at least before put all those shared
we should dma_wait_fence() on them to make sure they are signaled)
this time obj->staged isn't NULL, and it is freed (nothing bad now
since obj->fence points to other place),
and obj->staged set to NULL,
this time should going through reservation_object_add_shared_inplace,
But BUG_ON(old->shared_count >= old->shared_max) will hit !
This looks a design flaw in reservation object, shouldn't we fix it ?
2) in add_excl_fence(), it simply set old->shared_count to 0, and put all
shared fences of old
is that correct? if excl fence is really exclusively used, why we still
consider both shared fence and
excl fence on wait_timeout_rcu() routine, see blew description of this routine
* reservation_object_wait_timeout_rcu - Wait on reservation's objects
* shared and/or exclusive fences.
* @obj: the reservation object
* @wait_all: if true, wait on all fences, else wait on just exclusive fence
* @intr: if true, do interruptible wait
* @timeout: timeout value in jiffies or zero to return immediately
* Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or
* greater than zer on success.
long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
bool wait_all, bool intr,
unsigned long timeout)
dri-devel mailing list