Re: [PATCH v2] gpu: nova-core: gsp: cmdq: reduce sleep delta in wait_for_msg
From: Eliot Courtney
Date: Mon Nov 02 2026 - 07:41:25 EST
On Mon Nov 2, 2026 at 9:30 PM JST, Alexandre Courbot wrote:
> If a message is not immediately available on the queue, `wait_for_msg`
> sleeps for 1 millisecond before checking again. This is 3 orders of
> magnitude more than Nouveau (which sleeps for 1 microsecond) or OpenRM
> (which does not sleep at all and busy-polls) and is way too much, as GSP
> commands are expected to be processed much faster than that.
>
> Reduce the sleep time to 1 microsecond. This effectively makes `fsleep`
> busy-loop with a call to `cpu_relax` afterwards, keeping latency to a
> minimum.
>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
> ---
> Changes in v2:
> - Wait for 1 microsecond. (Eliot)
> - Link to v1: https://patch.msgid.link/20261030-cmdq_wait_msg_timeout-v1-1-a1e628d2732c@xxxxxxxxxx
> ---
Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>