From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796511184; b=Vw3ZyINN2rqmD1ojUH691ihgPvBP+spjslMYAf+HXIj8YRfwh2IiGCgDetSr1Yqb2KSI z89QMDJxzWFEnJCOWKUa3H0Y2q7gt8AyCwqZw1wnM90gCQ7JrZo1VkpiSNRnUPhdQD63Z AoXwC/RiXdiwVjhQZLirfjTYs99wyl4lNVSBdXr4HO3JIddfsGplnQJXfjUX5Q2Vz4jSV ncSWctLOV5cgbA5UBRbeFlIReaSHJ/ajqFKFWZYi/h5HbrXtXtPQhaRX94VeZx936b2pA WdJAIAx8MUqQFULa+bBy34i9W4peTZbDeic0JrEfmjRm4tlwPZGkfUpX9lY+2u+fE6Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796511184; h=Received:DKIM-Signature:Mime-Version:Content-Transfer-Encoding: Content-Type:Date:Message-Id:Cc:To:From:Subject:References: In-Reply-To; bh=+xouL1DmrAkxmpmYXso6qdpzM1FTAkUlCxaQHfard5M=; b=0WKe1pCXAA6fGvqKRmaZN9UbJ5Zxo0kS58XTo+Gh70Dpa3ZrCjNBK2yVWjq7CeNzVR33 M8yGfV2SaKN8kGsj3vSkqIOzuIpdQ6n1YTtN7aXecvD7SViTjnSm3K8ZUapFFGkoDNRzq NmELKZlRSlqDcCVavRdiYDzy43qezEjdGFqhxcyUy2QDnbNwe8dl4/AM8gbCerqNBCebp JGEuyFB2TjA7dx6ZXdPtOeEal+DfZnUYNh1qgROaAXP3cmhjO2Cnr8lmtyP13P2fFXT3i ht/7WkaPKknvKNzFOLDSvezUeK9lANEb81L6NK9ca8GlAix95kJ741IXSuKSHDNJ5xw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=m5+wPevt; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E82A0606A31F for ; Sat, 5 Dec 2026 22:53:03 +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=m5+wPevt Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78C2F1F0092B; Sat, 5 Dec 2026 22:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796511183; bh=+xouL1DmrAkxmpmYXso6qdpzM1FTAkUlCxaQHfard5M=; h=Date:Cc:To:From:Subject:References:In-Reply-To; b=m5+wPevtx0u+B96VcBrOu8b6muuYSRGY9oakF2cBVBLsgbW1nsW8V7zBQ3tXoiCWQ purxrcU0VXlrXQL+ZRqk8H3Yrhgsru66NY1yiQdrmIlENFmXrBxvYa9iie/bYUFQKS T6BHyXxwMqFBC39EdgWLcLIUxjDJ+wWIyyfUPqoJMuWXjXuPH/943BdDpkmfpfDaBX j6cE6wF9yql/kc/oKjUePwVUxFhGPHHdYm4RAY6ntBReM0ASmcNuvx8UOLeVqUbfN2 ymEhrSkrCNR9iaAkstfByKYhTOXdTr3AFHm/duXQHWHVi9SDa1x2Iy4y3qE1TkAzm5 dXWJaDmlJchCw== X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 05 Dec 2026 23:53:00 +0100 Message-Id: Cc: , , "Lyude Paul" , To: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Mah=C3=A9?= From: "Danilo Krummrich" Subject: Re: [PATCH v2] drm/nouveau/fifo/gf100-: reset the faulting engine even if it switched channels References: <20261127113005.981725-1-frederic.mahe@cirad.fr> In-Reply-To: <20261127113005.981725-1-frederic.mahe@cirad.fr> On Fri Nov 27, 2026 at 12:30 PM CET, Fr=C3=A9d=C3=A9ric Mah=C3=A9 wrote: > When an engine reports an MMU fault, recovery flags the faulting > channel group and nvkm_runl_rc() resets only the engines whose current > context (cxid) belongs to a flagged group. On Fermi the fault can be > reported after GR has started switching to another channel: the engine > status then reads e.g. 0x01140003 (not busy, chid 3) while channel 4 > faulted, so GR is not reset, stays stalled on the fault, and the > runlist update never completes: > > fifo: fault 01 [WRITE] at 0 engine 00 [PGRAPH] client 0f [GPC0/PROP] re= ason 02 [PAGE_NOT_PRESENT] on channel 4 > object-namespac[1768]: channel 4 killed! > fifo:000000:00[ gr]: 01140003: busy 0 save 1 unk0 0 unk1 0 chid 3 > fifo:000000:00[ gr]: cxid not valid > WARNING: drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c:228 at nv50_ru= nl_wait+0xe8/0x100 [nouveau] > fifo: SCHED_ERROR 0d [] > WARNING: drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c:251 at nvkm_ru= nl_preempt_wait+0xf7/0x110 [nouveau] > > After that no channel makes progress: the whole GPU is dead until a > reboot, and processes using it hang in D state. > > Record in the channel group which engines reported a fault for it. The > recovery pass that takes the group from pending to running collects > that mask, and resets those engines regardless of what their status > says. Resetting GR may discard the context being switched in, but that > is far better than losing the GPU. I think this was already the case before commit 4d60100a23ec ("drm/nouveau/= fifo: add common channel recovery"), but now this would also affect Kepler GPUs, right? > Faults reported for a group whose recovery is already running are > recorded but never acted on: as before, such a group is not recovered > again, and keeping the mask with the group means a later recovery of > another group cannot reset an engine on its behalf. > > Tested on a Quadro 600 (GF108): a program that faults (piglit > "object-namespace-pollution glClearTexSubImage texture") while three > other processes keep GR busy hangs the GPU within one to three faults > without this patch. With it, 20 of 20 faults recovered (17 of them hit > the state above), with no runlist timeouts, and the GPU kept working. > On an NVS 315 (GF119) the same test hangs the GPU at the first fault > without this patch; with it, 20 of 20 rounds completed, every fault was > recovered, and the GPU kept working. > > Written with help from Claude (Anthropic); reviewed and tested on hardwar= e. This shouldn't be part of the commit message, please move it below the '---= ' separator. Thanks, Danilo 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 E7E6E606A31F for ; Sat, 5 Dec 2026 22:53:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=m5+wPevt Received: from kara.freedesktop.org (unknown [131.252.210.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3E7E10E3B2; Sat, 5 Dec 2026 22:53:16 +0000 (UTC) Received: from kara.freedesktop.org (localhost [127.0.0.1]) by kara.freedesktop.org (Postfix) with ESMTP id AB78E404BD; Sat, 05 Dec 2026 22:53:11 +0000 (UTC) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=lists.freedesktop.org; s=20240201; t=1796511191; b=rUIU8r8RLcylsF2oCHmIrrXl7DxdzLgnKPrMckrL36p3aeZwWaI9hR2uhAHdFzCIoiPT8 1I4+E7rQvyF9RjTHYAoYKJRsIP14ebgkf88oFrMd9+2bPm5nhAexuwXxxWBkNR+Z0KDri5W KeqU1obUcczkpqq8B7HW3+nMzn+nBPGwc+3VbSKIcqT6t+1HX7jHgOzvXLGS0UJduRbVIxP PgVpOEl6lpX4Pa9puMQxCK/eUie+v272FoyxtsT6ojviIyGnVHPzcssSoyixjo5A+3Pyy5j fF6uGee9oNh1jtpvoM9M31skkLmB6PsGYSbloueX+Sfcmg2O6QVHvc+dIGZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.freedesktop.org; s=20240201; t=1796511191; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=+xouL1DmrAkxmpmYXso6qdpzM1FTAkUlCxaQHfard5M=; b=x9wA27DgSBjawK/K3cWeTAVbB6fOf+IycrFZweVJRfM9kcE+h4s7zY+6/QmnTjrgzio/L F34CRHwosWAl31QQO7hOHQ65PfhKE+fUS+m5belTqOFtvof1dpJymNJbKGTJS6zwQGg4v1N sAc+48QHFdlu6geggecHpGJ/EZqqXQS/Erx2CHZUDlCeErTxY3vMzbz729oTjcP/8FF0WRD +VzeYQVKQoVcDKC7pZoXzNc1T4KzcincuKHNSufwCaogNbLnRJqlXOZ3yKyj3k6oGpsUvkm FAFUuXiDfZGhmaAtWBv2OfzRzaoDZHT6ejDLVPevsu5MTcYGwg3rjzTIQHMw== ARC-Authentication-Results: i=1; mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none; dmarc=pass header.from=kernel.org policy.dmarc=quarantine Authentication-Results: mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by kara.freedesktop.org (Postfix) with ESMTPS id 16D3D40188 for ; Sat, 05 Dec 2026 22:53:09 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id F206A10E0C7; Sat, 5 Dec 2026 22:53:03 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id A80CE409A3; Sat, 5 Dec 2026 22:53:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78C2F1F0092B; Sat, 5 Dec 2026 22:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796511183; bh=+xouL1DmrAkxmpmYXso6qdpzM1FTAkUlCxaQHfard5M=; h=Date:Cc:To:From:Subject:References:In-Reply-To; b=m5+wPevtx0u+B96VcBrOu8b6muuYSRGY9oakF2cBVBLsgbW1nsW8V7zBQ3tXoiCWQ purxrcU0VXlrXQL+ZRqk8H3Yrhgsru66NY1yiQdrmIlENFmXrBxvYa9iie/bYUFQKS T6BHyXxwMqFBC39EdgWLcLIUxjDJ+wWIyyfUPqoJMuWXjXuPH/943BdDpkmfpfDaBX j6cE6wF9yql/kc/oKjUePwVUxFhGPHHdYm4RAY6ntBReM0ASmcNuvx8UOLeVqUbfN2 ymEhrSkrCNR9iaAkstfByKYhTOXdTr3AFHm/duXQHWHVi9SDa1x2Iy4y3qE1TkAzm5 dXWJaDmlJchCw== X-Archived-By: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 05 Dec 2026 23:53:00 +0100 Message-Id: To: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Mah=C3=A9?= From: "Danilo Krummrich" Subject: Re: [PATCH v2] drm/nouveau/fifo/gf100-: reset the faulting engine even if it switched channels References: <20261127113005.981725-1-frederic.mahe@cirad.fr> In-Reply-To: <20261127113005.981725-1-frederic.mahe@cirad.fr> Message-ID-Hash: LMOBBUIZ2F7F3JJRSGACOGFY5D2DOD4I X-Message-ID-Hash: LMOBBUIZ2F7F3JJRSGACOGFY5D2DOD4I X-MailFrom: dakr@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation CC: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, stable@vger.kernel.org X-Mailman-Version: 3.3.10 Precedence: list List-Id: Nouveau development list Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Fri Nov 27, 2026 at 12:30 PM CET, Fr=C3=A9d=C3=A9ric Mah=C3=A9 wrote: > When an engine reports an MMU fault, recovery flags the faulting > channel group and nvkm_runl_rc() resets only the engines whose current > context (cxid) belongs to a flagged group. On Fermi the fault can be > reported after GR has started switching to another channel: the engine > status then reads e.g. 0x01140003 (not busy, chid 3) while channel 4 > faulted, so GR is not reset, stays stalled on the fault, and the > runlist update never completes: > > fifo: fault 01 [WRITE] at 0 engine 00 [PGRAPH] client 0f [GPC0/PROP] re= ason 02 [PAGE_NOT_PRESENT] on channel 4 > object-namespac[1768]: channel 4 killed! > fifo:000000:00[ gr]: 01140003: busy 0 save 1 unk0 0 unk1 0 chid 3 > fifo:000000:00[ gr]: cxid not valid > WARNING: drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c:228 at nv50_ru= nl_wait+0xe8/0x100 [nouveau] > fifo: SCHED_ERROR 0d [] > WARNING: drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c:251 at nvkm_ru= nl_preempt_wait+0xf7/0x110 [nouveau] > > After that no channel makes progress: the whole GPU is dead until a > reboot, and processes using it hang in D state. > > Record in the channel group which engines reported a fault for it. The > recovery pass that takes the group from pending to running collects > that mask, and resets those engines regardless of what their status > says. Resetting GR may discard the context being switched in, but that > is far better than losing the GPU. I think this was already the case before commit 4d60100a23ec ("drm/nouveau/= fifo: add common channel recovery"), but now this would also affect Kepler GPUs, right? > Faults reported for a group whose recovery is already running are > recorded but never acted on: as before, such a group is not recovered > again, and keeping the mask with the group means a later recovery of > another group cannot reset an engine on its behalf. > > Tested on a Quadro 600 (GF108): a program that faults (piglit > "object-namespace-pollution glClearTexSubImage texture") while three > other processes keep GR busy hangs the GPU within one to three faults > without this patch. With it, 20 of 20 faults recovered (17 of them hit > the state above), with no runlist timeouts, and the GPU kept working. > On an NVS 315 (GF119) the same test hangs the GPU at the first fault > without this patch; with it, 20 of 20 rounds completed, every fault was > recovered, and the GPU kept working. > > Written with help from Claude (Anthropic); reviewed and tested on hardwar= e. This shouldn't be part of the commit message, please move it below the '---= ' separator. Thanks, Danilo