Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "Brost, Matthew" <matthew.brost@intel.com>,
	"Upadhyay, Tejas" <tejas.upadhyay@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Vivi,  Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/xe: skip error capture when exec queue is killed
Date: Fri, 26 Apr 2024 13:46:24 +0000	[thread overview]
Message-ID: <63e904d67d1d6749932f270d70061ef232a5ddff.camel@intel.com> (raw)
In-Reply-To: <ZiqDf8xAFFssvImq@DUT025-TGLU.fm.intel.com>

On Thu, 2024-04-25 at 16:23 +0000, Matthew Brost wrote:
> On Thu, Apr 25, 2024 at 05:59:31PM +0530, Tejas Upadhyay wrote:
> > When user closes exec queue soon after job submission,
> > we are generating error coredump. Instead check if
> > exec queue is killed during job timeout then skip
> > error coredump capture, just free the job and return
> > proper scheduler state.

Where that is happening?

Iris/OpenGL driver was not waiting for exec queue to idle and it was causing '*ERROR* GT0: TLB invalidation' errors in Xe KMD.
That was fixed here: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27500/diffs?commit_id=665d30b5448f606d7a79afe0596c3a2264ab3e15

I guess we can have some handling in Xe KMD but UMD or IGT needs to be fixed too.


> > 
> > Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_guc_submit.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> > index 93e1ee183e4a..376a2c04e899 100644
> > --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> > +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> > @@ -971,7 +971,8 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
> >  	 * TDR has fired before free job worker. Common if exec queue
> >  	 * immediately closed after last fence signaled.
> >  	 */
> > -	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &job->fence->flags)) {
> > +	if (exec_queue_killed(q) || 
> 
> You still need to timeout the job if the DMA_FENCE_FLAG_SIGNALED_BIT is
> clear otherwise will never signal.
> 
> So it should be something like this:
> 
> -       simple_error_capture(q);
> -       xe_devcoredump(job);
> +       if (!exec_queue_killed(q)) {
> +               simple_error_capture(q);
> +               xe_devcoredump(job);
> +       }
> 
> I think I've convinced myself skipping error the capture if correct in
> this case. e.g. If a user ctrl-c an app, we shouldn't do an job capture
> on the jobs which the KMD kills.
> 
> @Rodrigo, @Jose, Thoughts? I know both you when done a bit of work here.

yeah don't make sense to capture in this case.

> 
> Matt
> 
> > +	    test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &job->fence->flags)) {
> >  		guc_exec_queue_free_job(drm_job);
> >  
> >  		return DRM_GPU_SCHED_STAT_NOMINAL;
> > -- 
> > 2.25.1
> > 


  reply	other threads:[~2024-04-26 13:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 12:29 [PATCH] drm/xe: skip error capture when exec queue is killed Tejas Upadhyay
2024-04-25 12:21 ` ✓ CI.Patch_applied: success for " Patchwork
2024-04-25 12:22 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-25 12:23 ` ✓ CI.KUnit: success " Patchwork
2024-04-25 12:34 ` ✓ CI.Build: " Patchwork
2024-04-25 12:37 ` ✓ CI.Hooks: " Patchwork
2024-04-25 12:38 ` ✓ CI.checksparse: " Patchwork
2024-04-25 13:00 ` ✓ CI.BAT: " Patchwork
2024-04-25 16:23 ` [PATCH] " Matthew Brost
2024-04-26 13:46   ` Souza, Jose [this message]
2024-04-29 20:32   ` Rodrigo Vivi
2024-04-30  5:19     ` Upadhyay, Tejas
2024-04-26  1:41 ` ✗ CI.FULL: failure for " Patchwork
2024-04-30 15:46 ` [PATCH] " Matthew Brost
2024-04-30 18:49 ` Matthew Brost

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=63e904d67d1d6749932f270d70061ef232a5ddff.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tejas.upadhyay@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