提交 1d93949e 编写于 作者: C Chris Wilson

drm/i915/gt: Cancel the flush worker more thoroughly

Since the worker may rearm, we currently are only guaranteed to flush
the work if we cancel the timer. If the work was running at the time we
try and cancel it, we will wait for it to complete, but it may leave
items in the pool and requeue the work. If we rearrange the immediate
discard of the pool then cancel the work, we know that the work cannot
rearm and so our flush will be final.

<0> [314.146044] i915_mod-1321    2.... 299799443us : intel_gt_fini_buffer_pool: intel_gt_fini_buffer_pool:227 GEM_BUG_ON(!list_empty(&pool->cache_list[n]))

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1920Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200525141957.3061-1-chris@chris-wilson.co.uk
上级 afeda4f3
...@@ -212,8 +212,9 @@ void intel_gt_flush_buffer_pool(struct intel_gt *gt) ...@@ -212,8 +212,9 @@ void intel_gt_flush_buffer_pool(struct intel_gt *gt)
{ {
struct intel_gt_buffer_pool *pool = &gt->buffer_pool; struct intel_gt_buffer_pool *pool = &gt->buffer_pool;
if (cancel_delayed_work_sync(&pool->work)) do {
pool_free_imm(pool); pool_free_imm(pool);
} while (cancel_delayed_work_sync(&pool->work));
} }
void intel_gt_fini_buffer_pool(struct intel_gt *gt) void intel_gt_fini_buffer_pool(struct intel_gt *gt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册