From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>
Cc: "Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, <nova-gpu@lists.linux.dev>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<rust-for-linux@vger.kernel.org>,
"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v6 11/15] gpu: nova-core: gsp: cmdq: do not sleep when waiting for a message with timeout 0
Date: Tue, 27 Oct 2026 17:01:40 +0900 [thread overview]
Message-ID: <DMFGOLKMN5B5.2R9D11QN25WPS@nvidia.com> (raw)
In-Reply-To: <20261027-cmdq-rpc-v6-11-bed9669724ba@nvidia.com>
On Tue Oct 27, 2026 at 4:35 PM JST, Alexandre Courbot wrote:
> `read_poll_timeout` can potentially sleep for the specified
> `sleep_delta` if `timeout_delta` is `Delta::ZERO` and the system clock
> is coarse enough to not register a tick between the time the function
> has been called and the time the loop test is done. `wait_for_msg` has a
> short test condition and is particularly vulnerable to this condition.
>
> Add a dedicated branch when `timeout` is `Delta::ZERO` to perform the
> test without calling `read_poll_timeout` and avoid potentially sleeping
> for 1ms.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
next prev parent reply other threads:[~2026-10-27 8:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 7:35 [PATCH v6 00/15] gpu: nova-core: gsp: prepare the command queue for r000 dual-message types Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 01/15] gpu: nova-core: gsp: cmdq: remove stale comment Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 02/15] gpu: nova-core: gsp: cmdq: simplify framing error description Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 03/15] gpu: nova-core: gsp: cmdq: validate checksum earlier on receive Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 04/15] gpu: nova-core: gsp: introduce and use proper RpcMessageHeader type Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 05/15] gpu: nova-core: gsp: cmdq: group the RPC-specific part of send_single_command Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 06/15] gpu: nova-core: gsp: cmdq: split the transport part of the send path Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 07/15] gpu: nova-core: gsp: cmdq: split RPC parsing part of the receive path Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 08/15] gpu: nova-core: gsp: cmdq: move RPC message logging to RpcMessage Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 09/15] gpu: nova-core: gsp: cmdq: split the transport part of the receive path Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 10/15] gpu: nova-core: gsp: cmdq: extract await_msg_with from await_msg Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 11/15] gpu: nova-core: gsp: cmdq: do not sleep when waiting for a message with timeout 0 Alexandre Courbot
2026-10-27 8:01 ` Eliot Courtney [this message]
2026-10-27 7:35 ` [PATCH v6 12/15] gpu: nova-core: gsp: cmdq: use consume_element to implement drain Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 13/15] gpu: nova-core: gsp: cmdq: move the RPC code into a sub-module Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 14/15] gpu: nova-core: gsp: move the RPC commands " Alexandre Courbot
2026-10-27 7:35 ` [PATCH v6 15/15] gpu: nova-core: gsp: add `rpc` to RPC message send/receive methods Alexandre Courbot
2026-10-28 2:31 ` [PATCH v6 00/15] gpu: nova-core: gsp: prepare the command queue for r000 dual-message types John Hubbard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMFGOLKMN5B5.2R9D11QN25WPS@nvidia.com \
--to=ecourtney@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®