[Intel-gfx] [PATCH 1/5] drm/i915/gt: Wait for new requests in intel_gt_retire_requests()

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Nov 15 12:56:17 UTC 2019


On 15/11/2019 12:49, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-11-15 12:45:52)
>>
>> On 14/11/2019 22:57, Chris Wilson wrote:
>>> Our callers fall into two categories, those passing timeout=0 who just
>>> want to flush request retirements and those passing a timeout that need
>>> to wait for submission completion (e.g. intel_gt_wait_for_idle()).
>>> Currently, we only wait for a snapshot of timelines at the start of the
>>> wait (but there was an expection that new requests would cause timelines
>>
>> expectation? exception?
> expectation
> 
>>> to appear at the end). However, our callers, such as
>>> intel_gt_wait_for_idle() before suspend, do require us to wait for the
>>> power management requests emitted by retirement as well. If we don't,
>>> then it takes an extra second or two for the background worker to flush
>>> the queue and mark the GT as idle.
>>
>> So with this change wait_for_idle waits for the kernel context to get
>> retired as well. And you say that's faster by a second or two? Which
>> flush gets so much slower, I mean from where, if we don't wait here?
> 
> intel_gt_pm_wait_for_idle() (so i915_gem_suspend, and selftests that
> exercise those same paths) then has to wait for the background retire
> worker to flush the final requests and drop the wakeref.

Ack.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko



More information about the Intel-gfx mailing list