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