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 1CA17606A32C for ; Fri, 4 Dec 2026 14:41:16 +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=l5ZRx/LO Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8351910E873; Fri, 4 Dec 2026 14:41:10 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 171FD10E873 for ; Fri, 4 Dec 2026 14:41:04 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id B0A22406CB; Fri, 4 Dec 2026 14:41:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81EDA1F000C2; Fri, 4 Dec 2026 14:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796395263; bh=ax53NgCMIEKnzXMO+zzJ133haE7KZZ56JJIUIO7MvvA=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=l5ZRx/LOjqsKnzD3Gog0ZdGqGcHSfYrhD4obdS02yWFzoYDzErjAOq6Cl6zIp9/0L jJyVSBscZEB4ENNgp5QtUx0Yf5w38kgKRp/gZh3PqF49UnUgjuwv4xYoiws+o2dQPl jMCMUhMAMp9HFDuzARYPDxuAKu14DV4tlLJCXW4vLoBX7wkxF4S8mNhBb26LQJH89U yS2JIiaOgc8ebP0gfEwMXghPKkDrAVMcKHvj0+q7aPbZ53GNArRP7/k2EYrNeLwD0W q+6oN0/HKxMqtdxnnf9Jf8w9UGQaMfweDejWc25thn/K22As64fLZ9RV1dKaeR34tB g7zWzldED0GVA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring To: "Frank Min" , amd-gfx@lists.freedesktop.org In-Reply-To: <20261204142408.988734-1-Frank.Min@amd.com> References: <20261204142408.988734-1-Frank.Min@amd.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 14:41:03 +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=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,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 2 potential issues to consider: - [Medium] drm/amdgpu: amdgpu_gmc_allocate_vm_inv_eng() only skips kiq[0] ring - [Low] drm/amdgpu: commit message repeats subject without rationale -- commit b1355b6a846065fc7eb680a37bdb10989818e156 Author: Frank Min > drm/amdgpu: skip vm inv for kiq ring > > skip vm inv for kiq ring > > Signed-off-by: Frank Min > Reviewed-by: Hawking Zhang [Severity: Low] The commit body repeats the subject line without explaining why this change is needed or why it is safe. Could it briefly note that skipping KIQ conserves limited per-GFXHUB VM invalidation engines and is safe because KIQ rings do not implement emit_vm_flush or use ring->vm_inv_eng? > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/am= d/amdgpu/amdgpu_gmc.c > index c3732a61f1c90..12165f20a2c73 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c > @@ -669,7 +669,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_devi= ce *adev) > if (ring =3D=3D &adev->mes.ring[0] || > ring =3D=3D &adev->mes.ring[1] || > ring =3D=3D &adev->umsch_mm.ring || > - ring =3D=3D &adev->cper.ring_buf) > + ring =3D=3D &adev->cper.ring_buf || > + ring =3D=3D &adev->gfx.kiq[0].ring) > continue; > =20 > /* Skip if the ring is a shared ring */ [Severity: Medium] Does checking &adev->gfx.kiq[0].ring miss KIQ rings on secondary XCCs? On multi-XCC devices such as GC 9.4.3, gfx_v9_4_3_sw_init() registers a KIQ ring for every xcc_id via amdgpu_gfx_kiq_init_ring(). Only skipping index 0 leaves kiq[1..num_xcc-1].ring consuming a VM invalidation engine on their GFXHUB, risking -EINVAL during probe if per-GFXHUB engines run out. Checking ring->funcs->type =3D=3D AMDGPU_RING_TYPE_KIQ would skip KIQ rings across all XCC instances. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204142408.9887= 34-1-Frank.Min@amd.com?part=3D1