All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: skip error capture when exec queue is killed
Date: Mon, 29 Apr 2024 16:32:29 -0400	[thread overview]
Message-ID: <ZjAD3Wrn19BPbqxa@intel.com> (raw)
In-Reply-To: <ZiqDf8xAFFssvImq@DUT025-TGLU.fm.intel.com>

On Thu, Apr 25, 2024 at 04:23:27PM +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.
> > 
> > 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.

Cc: @Maarten

yeap, it does make sense to me to skip the error capture on canceled jobs.

> 
> 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
> > 

  parent reply	other threads:[~2024-04-29 20:32 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
2024-04-29 20:32   ` Rodrigo Vivi [this message]
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=ZjAD3Wrn19BPbqxa@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.