From: sashiko-bot@kernel.org
To: "Arisa Snowbell" <arisa.snowbell@gmail.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/amdgpu/userq: don't restore user queues during system sleep
Date: Tue, 24 Nov 2026 08:56:40 +0000 [thread overview]
Message-ID: <sashiko-outbox-230755@kernel.org> (raw)
In-Reply-To: <2ba4e27796fb1777481bd91d8467439a85542a42.1795482456.git.arisa.snowbell@gmail.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm/amdgpu: infinite retry loop in
amdgpu_userq_ensure_ev_fence() [1]
--
commit 1073e972cefe081a3547954bcb099da6f1184516
Author: Arisa Snowbell <arisa.snowbell@gmail.com>
drm/amdgpu/userq: don't restore user queues during system sleep
This commit blocks user queue restore work from being scheduled during
system sleep preparation and moves the restore worker to
system_freezable_wq so restores do not race with VRAM eviction.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index ed6f3b67e8720..7960341f7f84f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
[ ... ]
> @@ -453,7 +464,7 @@ amdgpu_userq_ensure_ev_fence(struct amdgpu_userq_mgr *uq_mgr,
> * Looks like there was no pending resume work,
> * add one now to create a valid eviction fence
> */
> - schedule_delayed_work(&uq_mgr->resume_work, 0);
> + amdgpu_userq_queue_restore(uq_mgr);
> goto retry;
[Severity: High]
This problem wasn't introduced by this patch, but can
amdgpu_userq_ensure_ev_fence() loop forever [1] if
amdgpu_userq_restore_worker() fails to install a new eviction fence?
When amdgpu_userq_vm_validate_and_restore_queue() fails (for example
with -ENOMEM), amdgpu_userq_restore_worker() exits without replacing
the signaled eviction fence:
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c:amdgpu_userq_restore_worker() {
...
ret = amdgpu_userq_vm_validate_and_restore_queue(uq_mgr);
if (ret) {
drm_file_err(uq_mgr->file, "Failed to validate BOs to restore ret=%d\n", ret);
goto put_fence;
}
...
}
amdgpu_userq_ensure_ev_fence() then sees the same signaled fence on the
next iteration and re-queues resume_work in an unkillable loop.
[1] https://sashiko.dev/#/bug/linux-d9fc724f-ccb0-417c-8973-b83fdfc48280
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1795482456.git.arisa.snowbell@gmail.com?part=1
next prev parent reply other threads:[~2026-11-24 8:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 2:32 [PATCH 0/1] drm/amdgpu/userq: fix S3 suspend hang with user queues Arisa Snowbell
2026-11-24 2:32 ` [PATCH 1/1] drm/amdgpu/userq: don't restore user queues during system sleep Arisa Snowbell
2026-11-24 8:56 ` sashiko-bot [this message]
2026-11-24 10:43 ` Arisa Snowbell
2026-11-24 12:15 ` [PATCH 0/1] drm/amdgpu/userq: fix S3 suspend hang with user queues Christian König
2026-11-24 13:01 ` Arisa Snowbell
2026-11-24 13:02 ` [PATCH v2] drm/amdgpu/userq: queue the restore worker on a freezable workqueue Arisa Snowbell
2026-11-24 13:51 ` Arisa Snowbell
2026-11-24 14:14 ` [PATCH v3] drm/amdgpu/userq: keep the restore worker out of system sleep Arisa Snowbell
2026-11-24 14:16 ` Arisa Snowbell
2026-11-24 16:23 ` sashiko-bot
2026-11-24 16:14 ` [PATCH v2] drm/amdgpu/userq: queue the restore worker on a freezable workqueue sashiko-bot
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=sashiko-outbox-230755@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arisa.snowbell@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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