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 B0104606A336 for ; Thu, 3 Dec 2026 12:26:57 +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=VLMvxJl1 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E12C10E13A; Thu, 3 Dec 2026 12:26:52 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F54E11286A for ; Thu, 3 Dec 2026 12:26:45 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 2EA9E44165; Thu, 3 Dec 2026 12:26:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A958F1F00893; Thu, 3 Dec 2026 12:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796300805; bh=giA6q0hc15XByUZO/vzzdskzrrtSCy42As684TCW8U4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=VLMvxJl1d4Pea2KR8aURaLiLaQZ22B9HMMq/3D1STbmU2rOJD6DvCJJJSCRD0Ymw2 cAODt2DczLHXQiebt8N5hDibyc1U0tQXZLz94xDe61OG8Z4W1P8xXbLKxfxhuMnNig /K92ghDKDFWSFE68fDt405oiZ+C2lS1px80EyRaqByZorMf286jr1FY7QDH1Rs0zlO +Nzm5C1cGHXH44FQ5Qrc0Q1H6fTvEEzzd7QyCnZFuRshme4JCuzakzMvpn1DTT0anX p+TJu124KXkLp6rpOkkGeR9GlGgZ9JqGILFgeMzYxjUY6vSQu8Lj5MFyN83xIltSNt AUZbtxMgYRFaA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 02/15] gpu: nova-core: gsp: add the GSP_INIT command and its reply To: "Alexandre Courbot" , "Danilo Krummrich" , "Alice Ryhl" , "David Airlie" , "Simona Vetter" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?b?QmrDtnJuIFJveSBCYXJvbg==?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , "Daniel Almeida" , "Tamir Duberstein" , =?utf-8?b?T251ciDDlnprYW4=?= , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "Jonathan Corbet" , "Shuah Khan" , "Randy Dunlap" Cc: "John Hubbard" , "Alistair Popple" , "Timur Tabi" , "Eliot Courtney" , "Zhi Wang" , "Alok Kumar" , nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org In-Reply-To: <20261203-b4-r000-switch-v1-2-b1463ec6dae2@nvidia.com> References: <20261203-b4-r000-switch-v1-0-b1463ec6dae2@nvidia.com> <20261203-b4-r000-switch-v1-2-b1463ec6dae2@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 12:26:42 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 1 potential issue to consider: - [Medium] gpu: nova-core: non-yielding 15s udelay busy-wait polling GspInit completion -- commit d8fe3c10d1e002df6f79291965859f48b65d0fb0 Author: John Hubbard gpu: nova-core: gsp: add the GSP_INIT command and its reply This commit adds the GMC GSP_INIT command, which encodes system information and registry keys into an NVKV payload for GSP-RM, and decodes the NVKV reply into GspStaticInfo. > diff --git a/drivers/gpu/nova-core/gsp/commands/gmc.rs b/drivers/gpu/nova= -core/gsp/commands/gmc.rs > new file mode 100644 > index 0000000000000..f74ada78f7ace > --- /dev/null > +++ b/drivers/gpu/nova-core/gsp/commands/gmc.rs > @@ -0,0 +1,133 @@ [ ... ] > +impl CommandToGsp for GspInit { > + const COMMAND: GmcCommandId =3D GmcCommandId::GspInit; > + /// Largest reply that the driver accepts, in bytes. > + const MAX_REPLY_SIZE: u32 =3D 48 * 1024; > + /// `GspInit` can take longer than 5 seconds to complete on some SKU= s. > + const COMPLETION_TIMEOUT: Delta =3D Delta::from_secs(15); [Severity: Medium] Can waiting up to 15 seconds for GspInit spin a CPU in a non-yielding udelay() loop? CmdqInner::await_gmc_reply() passes COMPLETION_TIMEOUT down to CmdqInner::wait_for_msg(), which polls via read_poll_timeout() with Delta::from_micros(1). fsleep() turns delays <=3D 10 us into udelay(), and read_poll_timeout() does not call cond_resched() inside the loop. On slower SKUs where GspInit takes more than 5 seconds (or if GSP-RM stalls until timeout), a CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY kernel will monopolize a CPU for the entire wait, starving runnable tasks and delaying RCU quiescent states. Using a sleep delta above 10 us in CmdqInner::wait_for_msg(), or letting long-running commands like GspInit select a sleeping poll interval, would avoid spinning the CPU during this wait. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-b4-r000-sw= itch-v1-0-b1463ec6dae2@nvidia.com?part=3D2