Re: [PATCH v5 2/9] gpu: nova-core: gsp: add mechanism to wait for space on command queue
From: Danilo Krummrich
Date: Wed Mar 04 2026 - 06:45:10 EST
On Wed Mar 4, 2026 at 2:42 AM CET, Eliot Courtney wrote:
> + fn allocate_command(&mut self, size: usize, timeout: Delta) -> Result<GspCommand<'_>> {
> + read_poll_timeout(
> + || Ok(self.driver_write_area_size()),
> + |available_bytes| *available_bytes >= size_of::<GspMsgElement>() + 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 1us.
> + timeout,
> + )?;