[Intel-gfx] [PATCH 23/41] drm/i915: Move object release to a freelist + worker
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Tue Oct 18 09:19:23 UTC 2016
On pe, 2016-10-14 at 13:18 +0100, Chris Wilson wrote:
> We want to hide the latency of releasing objects and their backing
> storage from the submission, so we move the actual free to a worker.
> This allows us to switch to struct_mutex freeing of the object in the
> next patch.
>
> Furthermore, if we know that the object we are dereferencing remains valid
> for the duration of our access, we can forgo the usual synchronisation
> barriers and atomic reference counting. To ensure this we defer freeing
> an object til after an RCU grace period, such that any lookup of the
> object within an RCU read critical section will remain valid until
> after we exit that critical section. We also employ this delay for
> rate-limiting the serialisation on reallocation - we have to slow down
> object creation in order to prevent resource starvation (in particular,
> files).
>
> v2: Return early in i915_gem_tiling() ioctl to skip over superfluous
> work on error.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
With the change from John,
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list