[Intel-gfx] [PATCH 4/7] drm/i915: Delay the freeing of requests until retire time

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 8 14:08:59 PST 2016


On Fri, Jan 08, 2016 at 06:47:25PM +0000, John.C.Harrison at Intel.com wrote:
> From: John Harrison <John.C.Harrison at Intel.com>
> 
> The request structure is reference counted. When the count reached
> zero, the request was immediately freed and all associated objects
> were unrefereced/unallocated. This meant that the driver mutex lock
> must be held at the point where the count reaches zero. This was fine
> while all references were held internally to the driver. However, the
> plan is to allow the underlying fence object (and hence the request
> itself) to be returned to other drivers and to userland. External
> users cannot be expected to acquire a driver private mutex lock.

It's a trivial issue to fix to enable freeing requests without holding the
struct_mutex. You don't need to even add any new lists, delayed freeing
mechanisms and whotnot.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list