diff options
author | David Jander <david@protonic.nl> | 2022-06-21 08:12:25 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-27 13:27:17 +0100 |
commit | ae7d2346dc89ae89a6e0aabe6037591a11e593c0 (patch) | |
tree | 23155ebdfdee2cf38b3ed9bd918e323c1fcc5ca8 /include/linux/virtio_config.h | |
parent | 1714582a3a087eda8786d5a1b32b2ec86ca8a303 (diff) |
spi: Don't use the message queue if possible in spi_sync
The interaction with the controller message queue and its corresponding
auxiliary flags and variables requires the use of the queue_lock which is
costly. Since spi_sync will transfer the complete message anyway, and not
return until it is finished, there is no need to put the message into the
queue if the queue is empty. This can save a lot of overhead.
As an example of how significant this is, when using the MCP2518FD SPI CAN
controller on a i.MX8MM SoC, the time during which the interrupt line
stays active (during 3 relatively short spi_sync messages), is reduced
from 98us to 72us by this patch.
Signed-off-by: David Jander <david@protonic.nl>
Link: https://lore.kernel.org/r/20220621061234.3626638-3-david@protonic.nl
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/virtio_config.h')
0 files changed, 0 insertions, 0 deletions