Re: [PATCH 2/4] spi: spi-fsl-dspi: Use non-coherent memory for DMA

Vladimir Oltean
2025-06-12T11:15:20Z

On Thu, Jun 12, 2025 at 12:05:26PM +0100, James Clark wrote:
> (No idea why it goes faster when it's under load, but I hope that can be
> ignored for this test)

Might be because of dynamic CPU frequency scaling as done by the governor.
If the CPU utilization of spidev_test isn't high enough, the governor
will prefer lower CPU frequencies. You can try to repeat the test with
the "performance" governor and/or setting the min frequency equal to the
max one.

That's why I don't like the DMA mode in DSPI, it's still CPU-bound,
because the DMA buffers are very small (you can only provide one TX FIFO
worth of data per DMA transfer, rather than the whole buffer).

FWIW, the XSPI FIFO performance should be higher.