Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix exiting context timeout calculation
Date: Tue, 29 Nov 2022 08:43:20 +0000	[thread overview]
Message-ID: <36b9d912-84b3-d050-59aa-b95c245551d2@linux.intel.com> (raw)
In-Reply-To: <20221128165209.353706-1-andrzej.hajda@intel.com>



On 28/11/2022 16:52, Andrzej Hajda wrote:
> In case context is exiting preempt_timeout_ms is used for timeout,
> but since introduction of DRM_I915_PREEMPT_TIMEOUT_COMPUTE it increases
> to 7.5 seconds. Heartbeat occurs earlier but it is still 2.5s.
> 
> Fixes: d7a8680ec9fb21 ("drm/i915: Improve long running compute w/a for GuC submission")
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2410
> Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
> ---
> Hi all,
> 
> I am not sure what is expected solution here, and if my patch does not
> actually reverts intentions of patch d7a8680ec9fb21. Feel free to propose
> something better.
> Other alternative would be to increase t/o in IGT tests, but I am not sure
> if this is good direction.

Is it the hack with the FIXME marker from 47daf84a8bfb ("drm/i915: Make 
the heartbeat play nice with long pre-emption timeouts") that actually 
breaks things? (If IGT modifies the preempt timeout the heartbeat 
extension will not work as intended.)

If so, I think we agreed during review that was a weakness which needs 
to be addressed, but I would need to re-read the old threads to remember 
what was the plan. Regardless what it was it may be time is now to 
continue with those improvements.

Regards,

Tvrtko

> 
> Regards
> Andrzej
> ---
>   drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index 49a8f10d76c77b..bbbbcd9e00f947 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> @@ -1248,6 +1248,10 @@ static unsigned long active_preempt_timeout(struct intel_engine_cs *engine,
>   	/* Force a fast reset for terminated contexts (ignoring sysfs!) */
>   	if (unlikely(intel_context_is_banned(rq->context) || bad_request(rq)))
>   		return INTEL_CONTEXT_BANNED_PREEMPT_TIMEOUT_MS;
> +	else if (unlikely(intel_context_is_exiting(rq->context)))
> +		return min_t(typeof(unsigned long),
> +			     READ_ONCE(engine->props.preempt_timeout_ms),
> +			     CONFIG_DRM_I915_PREEMPT_TIMEOUT);
>   
>   	return READ_ONCE(engine->props.preempt_timeout_ms);
>   }

  parent reply	other threads:[~2022-11-29  8:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 16:52 [Intel-gfx] [PATCH] drm/i915: fix exiting context timeout calculation Andrzej Hajda
2022-11-28 18:06 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-11-28 18:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-29  0:32 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-11-29  8:43 ` Tvrtko Ursulin [this message]
2022-12-01  0:22   ` [Intel-gfx] [PATCH] " John Harrison
2022-12-01 10:28     ` Tvrtko Ursulin
2022-12-01 16:36       ` Andrzej Hajda
2022-12-02  9:14         ` Tvrtko Ursulin
2022-12-02 12:19           ` Andrzej Hajda
2022-12-02 13:13             ` Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36b9d912-84b3-d050-59aa-b95c245551d2@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox