From: Matthew Brost <matthew.brost@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Fix fault on fd close when wedged
Date: Wed, 11 Dec 2024 19:51:57 -0800 [thread overview]
Message-ID: <Z1pd3co1pwBPvExA@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20241211225332.1136152-1-lucas.demarchi@intel.com>
On Wed, Dec 11, 2024 at 02:53:32PM -0800, Lucas De Marchi wrote:
> If device is wedged, the final run ticks update for the client should be
> skipped as it's already unmapped. Fix this pagefault when forcing a
Where does exec queue get unmapped on wedging a device?
Matt
> wedged state with igt:
>
> <6> [IGT] xe_wedged: exiting, ret=98
> <1> BUG: unable to handle page fault for address: ffffc901bc5e508c
> <1> #PF: supervisor read access in kernel mode
> <1> #PF: error_code(0x0000) - not-present page
> ...
> <4> xe_lrc_update_timestamp+0x1c/0xd0 [xe]
> <4> xe_exec_queue_update_run_ticks+0x50/0xb0 [xe]
> <4> xe_exec_queue_fini+0x16/0xb0 [xe]
> <4> __guc_exec_queue_fini_async+0xc4/0x190 [xe]
> <4> guc_exec_queue_fini_async+0xa0/0xe0 [xe]
> <4> guc_exec_queue_fini+0x23/0x40 [xe]
> <4> xe_exec_queue_destroy+0xb3/0xf0 [xe]
> <4> xe_file_close+0xd4/0x1a0 [xe]
> <4> drm_file_free+0x210/0x280 [drm]
> <4> drm_close_helper.isra.0+0x6d/0x80 [drm]
> <4> drm_release_noglobal+0x20/0x90 [drm]
>
> Fixes: 83db047d9425 ("drm/xe: Stop accumulating LRC timestamp on job_free")
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3421
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/xe/xe_exec_queue.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index aab9e561153dc..9ad7a6b24cc3a 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -265,7 +265,9 @@ void xe_exec_queue_fini(struct xe_exec_queue *q)
> * Before releasing our ref to lrc and xef, accumulate our run ticks
> * and wakeup any waiters.
> */
> - xe_exec_queue_update_run_ticks(q);
> + if (!xe_device_wedged(gt_to_xe(q->gt)))
> + xe_exec_queue_update_run_ticks(q);
> +
> if (q->xef && atomic_dec_and_test(&q->xef->exec_queue.pending_removal))
> wake_up_var(&q->xef->exec_queue.pending_removal);
>
> --
> 2.47.0
>
next prev parent reply other threads:[~2024-12-12 3:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 22:53 [PATCH] drm/xe: Fix fault on fd close when wedged Lucas De Marchi
2024-12-11 23:12 ` ✓ CI.Patch_applied: success for " Patchwork
2024-12-11 23:12 ` ✓ CI.checkpatch: " Patchwork
2024-12-11 23:13 ` ✓ CI.KUnit: " Patchwork
2024-12-11 23:31 ` ✓ CI.Build: " Patchwork
2024-12-11 23:34 ` ✓ CI.Hooks: " Patchwork
2024-12-11 23:35 ` ✓ CI.checksparse: " Patchwork
2024-12-12 3:51 ` Matthew Brost [this message]
2024-12-12 4:26 ` [PATCH] " Lucas De Marchi
2024-12-12 16:30 ` Matthew Brost
2024-12-17 22:20 ` Lucas De Marchi
2024-12-12 4:43 ` ✗ Xe.CI.Full: failure for " Patchwork
2024-12-12 6:38 ` ✓ CI.BAT: success " Patchwork
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=Z1pd3co1pwBPvExA@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@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