AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Armas Spann" <zappel@simple-co.de>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/amdkfd: apply queue property updates only after unmap
Date: Fri, 04 Dec 2026 17:30:14 +0000	[thread overview]
Message-ID: <sashiko-outbox-250320@kernel.org> (raw)
In-Reply-To: <20261204125251.10703-8-zappel@simple-co.de>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/amdkfd: missing Fixes trailer for pre-unmap ring_bo drop
--

commit 362d257074216fcd562fb4d896a82eb30c53186f
Author: Armas Spann <zappel@simple-co.de>

> drm/amdkfd: apply queue property updates only after unmap
>
> pqm_update_queue_properties() drops the references on the old ring
> buffer and overwrites the queue properties before update_queue() takes
> the queue off the hardware. If the unmap fails, the scheduler keeps
> running the old ring, which is no longer protected against being
> unmapped, while the driver describes the new one.
>
> Hand the new properties to update_queue() in the mqd_update_info of the
> call and let it apply them at the point where the queue is unmapped,
> under the dqm lock. Swap the ring buffer reference afterwards, and only
> if the properties were applied. The properties travel with the call and
> not in the queue, because set_perfcount() updates every queue of every
> process under the dqm lock alone, and must not apply the properties of
> an update that is in flight for one of them.
>
> The update used to pass no mqd_update_info. It passes one now, and the
> gfx9 MQD manager derives a compute resource limit bit from its GWS flag
> on GC 9.4.2 and later, so the flag is set from the GWS state of the
> queue to leave that bit as pqm_set_gws() programmed it.
>
> A queue that is updated while the scheduler is stopped, in the no-HWS
> debug mode, now gets -EBUSY. The update is not applied in that state;
> it returned success before.
>
> Signed-off-by: Armas Spann <zappel@simple-co.de>
> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

[Severity: Low]
This fixes dropping the old ring_bo reference and overwriting ring_bo
before update_queue() unmaps the queue in pqm_update_queue_properties().
Should this include:

  Fixes: 305cd109b761 ("drm/amdkfd: Validate user queue update")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204125251.10703-1-zappel@simple-co.de?part=7

  reply	other threads:[~2026-12-04 17:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 12:52 [PATCH 0/8] drm/amdkfd: keep queue storage until MES has retired the queue Armas Spann
2026-12-04 12:52 ` [PATCH 1/8] drm/amdgpu/mes: distinguish rejected from timed out commands Armas Spann
2026-12-04 14:30   ` sashiko-bot
2026-12-04 12:52 ` [PATCH 2/8] drm/amdkfd: make the per-queue MES resource cleanup usable by the dqm Armas Spann
2026-12-04 12:52 ` [PATCH 3/8] drm/amdkfd: track whether MES knows each queue Armas Spann
2026-12-04 15:25   ` sashiko-bot
2026-12-04 12:52 ` [PATCH 4/8] drm/amdkfd: add a quarantine for queues MES has not retired Armas Spann
2026-12-04 16:00   ` sashiko-bot
2026-12-04 12:52 ` [PATCH 5/8] drm/amdkfd: keep queue storage until MES confirmed retirement Armas Spann
2026-12-04 16:31   ` sashiko-bot
2026-12-04 12:52 ` [PATCH 6/8] drm/amdkfd: keep eviction and restore consistent when MES fails Armas Spann
2026-12-04 17:07   ` sashiko-bot
2026-12-04 12:52 ` [PATCH 7/8] drm/amdkfd: apply queue property updates only after unmap Armas Spann
2026-12-04 17:30   ` sashiko-bot [this message]
2026-12-04 12:52 ` [PATCH 8/8] drm/amdkfd: reconcile queue state with MES after a restart Armas Spann

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-250320@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zappel@simple-co.de \
    /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