[Bug 109005] i915 slab shrink cause a panic

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 20 08:57:11 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=109005

--- Comment #7 from Yang Bin <bin.yang at intel.com> ---
I had reproduced this issue successfully and found the root cause as below.

i915_gem_wait_for_idle() waits for all requests being completed and
calls i915_retire_requests() to retire them. It assumes the
active_requests should be zero finally.

In i915_retire_requests(), it will retire all requests on the active
rings. Unfortunately, active_requests is increased in
i915_request_alloc() and reduced in i915_request_retire(), but the
request is added into active rings in i915_request_add().

If i915_gem_wait_for_idle() is called between i915_request_alloc()
and i915_request_add(), this request will not be retired. Then, the
active_requests will not be zero in the end.

Normally, i915_request_alloc() and i915_request_add() will be called
in sequence with drm.struct_mutex locked. But in
intel_vgpu_create_workload(), it will pre-allocate the request and
call i915_request_add() in the workload thread for performance
optimization. The above issue will be triggered.

I had submitted a RFC patch and continue to discuss it in maillist. Please
refer to https://lkml.org/lkml/2018/12/20/78

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20181220/387df59f/attachment.html>


More information about the intel-gfx-bugs mailing list