[Intel-gfx] [PATCH] drm/i915/guc: Do not use wait_for_atomic in host2guc_action

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Jun 28 16:04:59 UTC 2016


On 28/06/16 16:50, Dave Gordon wrote:
> On 28/06/16 15:30, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>
>> host2guc_action does not appear to be called from atomic context
>> so a more polite wait_for macro should be used. Especially since
>> the timeout is 10ms.
>
> Maybe. However we don't really want to sleep if the action takes only a
> few microseconds, which some of them do. Maybe we need an optimistic
> spin for a few uS to handle the quick commands followed by a sleeping
> wait in the cases where it takes long enough that we don't mind the
> extra wakeup latency?

I believe Mika is working on smart waits similar to what you describe. 
Adaptive back-off etc.

In the meantime how about calling _wait_for directly and setting the 
re-check period to something you think is more appropriate for the GuC?

Shouldn't be less than 10us since usleep_range recommends against it.

Regards,

Tvrtko


More information about the Intel-gfx mailing list