From: Matthew Brost <matthew.brost@intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH V3] drm/xe: cancel pending job timer before freeing scheduler
Date: Mon, 24 Feb 2025 21:33:17 -0800 [thread overview]
Message-ID: <Z71WHQu6dKcw7nbF@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20250225045754.600905-1-tejas.upadhyay@intel.com>
On Tue, Feb 25, 2025 at 10:27:54AM +0530, Tejas Upadhyay wrote:
> Async call to __guc_exec_queue_fini_async frees scheduler
> at the same time when some scheduler submission would have
> timed out and restarted. To handle such small window race
> case, all pending jobs timer should be cancelled before
> freeing scheduler.
>
'The async call to __guc_exec_queue_fini_async frees the scheduler while
a submission may time out and restart. To prevent this race condition,
the pending job timer should be canceled before freeing the scheduler.'
> V3(MattB):
> - Adjust position of cancel pending job
> - Remove gitlab issue# from commit message
> V2(MattB):
> - Cancel pending jobs before scheduler finish
>
Fixes tag?
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
With above:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_submit.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 913c74d6e2ae..b6a2dd742ebd 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -1248,6 +1248,8 @@ static void __guc_exec_queue_fini_async(struct work_struct *w)
>
> if (xe_exec_queue_is_lr(q))
> cancel_work_sync(&ge->lr_tdr);
> + /* Confirm no work left behind accessing device structures */
> + cancel_delayed_work_sync(&ge->sched.base.work_tdr);
> release_guc_id(guc, q);
> xe_sched_entity_fini(&ge->entity);
> xe_sched_fini(&ge->sched);
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-02-25 5:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 4:57 [PATCH V3] drm/xe: cancel pending job timer before freeing scheduler Tejas Upadhyay
2025-02-25 5:33 ` Matthew Brost [this message]
2025-02-25 5:36 ` ✓ CI.Patch_applied: success for drm/xe: cancel pending job timer before freeing scheduler (rev2) Patchwork
2025-02-25 5:37 ` ✓ CI.checkpatch: " Patchwork
2025-02-25 5:38 ` ✓ CI.KUnit: " Patchwork
2025-02-25 5:54 ` ✓ CI.Build: " Patchwork
2025-02-25 5:57 ` ✓ CI.Hooks: " Patchwork
2025-02-25 5:58 ` ✓ CI.checksparse: " Patchwork
2025-02-25 6:16 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-25 11:35 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-26 5:02 ` Upadhyay, Tejas
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=Z71WHQu6dKcw7nbF@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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