[Intel-gfx] [PATCH] drm/i915/gt: Always reschedule the new heartbeat

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Mar 17 16:50:02 UTC 2020


On 17/03/2020 16:32, Chris Wilson wrote:
> In order to better respond to new heartbeat intervals given via sysfs,
> always reprogramme an active heartbeat upon change (i.e. use
> mod_delayed_work to reschedule rather than queue_delayed_work which
> ignores an already active work.)
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> index dd825718e4e5..5136c8bf112d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> @@ -31,7 +31,7 @@ static bool next_heartbeat(struct intel_engine_cs *engine)
>   	delay = msecs_to_jiffies_timeout(delay);
>   	if (delay >= HZ)
>   		delay = round_jiffies_up_relative(delay);
> -	schedule_delayed_work(&engine->heartbeat.work, delay);
> +	mod_delayed_work(system_wq, &engine->heartbeat.work, delay);
>   
>   	return true;
>   }
> 

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

What about the transition from disabled (or long) preempt timeout to a 
normal one?

Regards,

Tvrtko


More information about the Intel-gfx mailing list