From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 566CDEB7ED3 for ; Wed, 4 Mar 2026 11:39:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FF3010E9C4; Wed, 4 Mar 2026 11:39:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Hy2HOrsP"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDEB110E9C4; Wed, 4 Mar 2026 11:39:14 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id C196060097; Wed, 4 Mar 2026 11:39:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FF2DC19423; Wed, 4 Mar 2026 11:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772624353; bh=UuegjYjNYdFZYA27dchsMoBmg0FJygSXcjoy8zrEaVM=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=Hy2HOrsPB2b4JElrQXZZO2/AwB1zsGmrhScOPZtBCa7DX8h2EXtAO7CrARdqoG8YT gkSqDunPagYps1kxEXIgVQFw7m2Qbt/sSh62rRVZMi63VwQ1sCfc90uYk1UIDJiWrg /aX1Gt1HLFzk05DW7yhl38EwR7IfUrkqujxbWMAtAJ52X7qKILjLqjVPMQtLLVsK6d h7601dTjKVpm5KTzJT1t5wrf2vvf6/3tFIDuMBhs125oZhEuFm6dpN/LAIp4pCwgRV H8bCOF0aWTK9E+FOROz1kQX6yvoGXDz6nCTg9I2T/8pMd/zI0ZqHl9ncEg9DA84I1F SdR9qICqcPcJA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 04 Mar 2026 12:39:08 +0100 Message-Id: Subject: Re: [PATCH v5 2/9] gpu: nova-core: gsp: add mechanism to wait for space on command queue Cc: "Alice Ryhl" , "Alexandre Courbot" , "David Airlie" , "Simona Vetter" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , "Zhi Wang" , "John Hubbard" , "Alistair Popple" , "Joel Fernandes" , "Timur Tabi" , , , , To: "Eliot Courtney" From: "Danilo Krummrich" References: <20260304-cmdq-continuation-v5-0-3f19d759ed93@nvidia.com> <20260304-cmdq-continuation-v5-2-3f19d759ed93@nvidia.com> In-Reply-To: <20260304-cmdq-continuation-v5-2-3f19d759ed93@nvidia.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed Mar 4, 2026 at 2:42 AM CET, Eliot Courtney wrote: > + fn allocate_command(&mut self, size: usize, timeout: Delta) -> Resul= t> { > + read_poll_timeout( > + || Ok(self.driver_write_area_size()), > + |available_bytes| *available_bytes >=3D size_of::() + size, > + Delta::ZERO, Isn't this either creating unneccessary thrashing of the memory controller = or unnecessary contention at the cache-coherency level? I think we should probably add at least a small delay of something around 1= us. > + timeout, > + )?;