[Intel-gfx] [PATCH 1/3] drm/i915: Complete both freed-object passes before draining the workqueue

Matthew Auld matthew.william.auld at gmail.com
Wed May 1 17:15:38 UTC 2019


On Wed, 1 May 2019 at 14:58, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> The workqueue code complains viciously if we try to queue more work onto
> the queue while attampting to drain it. As we asynchronously free
> objects and defer their enqueuing with RCU, it is quite tricky to
> quiesce the system before attempting to drain the workqueue. Yet drain
> we must to ensure that the worker is idle before unloading the module.
>
> Give the freed object drain 3 whole passes with multiple rcu_barrier()
> to give the defer freeing of several levels each protected by RCU and
> needing a grace period before its parent can be freed, ultimately
> resulting in a GEM object being freed after another RCU period.
>
> A consequence is that it will make module unload even slower.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110550
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list