From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5D90606A32D for ; Fri, 4 Dec 2026 17:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=T2fYT6bq Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7674B10E962; Fri, 4 Dec 2026 17:30:22 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 174A710E962 for ; Fri, 4 Dec 2026 17:30:16 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 13F2B61810; Fri, 4 Dec 2026 17:30:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B059D1F0093B; Fri, 4 Dec 2026 17:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796405414; bh=l92Qkwz32w+EVJB78zbuJ9HPBxPZggWNbQBhping6zw=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=T2fYT6bqgF1Iv9hwBm+Qw4ZIqIeFgDJDZ8YGiho79WOEP+OzEN0aIcJIr1k6iW+sR KvvxWrEXv3yyBlyJ1Gb5GT0Md7r3KxKt1VgG6uC2wVWNvEGicyLzCfoDoCyCPp5TBb WMVTGAidosQvvARSJD/QF2ZbNgpgAkAv/dLUutFj3XXoss19h+xIX2OLtDfo72IQj7 AjrH44L1dzTN+ZeDBwnAvIsnM1Po00XXdPEvTac5gpRQdz/8kaznHRnhoaLGZ3i0Js iOOgYkxDo7vF9qyyJpAaBDiFbztEtDsB1ruDQ81kufww6d+zq9UBqYWpZUZV3oF3VF ccuhELAvyQLjQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 7/8] drm/amdkfd: apply queue property updates only after unmap To: "Armas Spann" , amd-gfx@lists.freedesktop.org In-Reply-To: <20261204125251.10703-8-zappel@simple-co.de> References: <20261204125251.10703-1-zappel@simple-co.de> <20261204125251.10703-8-zappel@simple-co.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 17:30:14 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "amd-gfx" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 > 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 > Co-Authored-By: Claude Fable 5.2 [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") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204125251.1070= 3-1-zappel@simple-co.de?part=3D7