mmc: bcm2835-sdhost: use Host Software Queueing mechanism
authorJonathan Bell <jonathan@raspberrypi.com>
Thu, 18 Jan 2024 14:32:16 +0000 (14:32 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:30 +0000 (11:35 +0000)
commitb55c748f5698510449005f4c174bfe6571f4c274
tree6b26f732097522deee8d653645cee18fcc54e3ae
parent8f817693d99cdb194e35ec93fdf8d2254f5471ad
mmc: bcm2835-sdhost: use Host Software Queueing mechanism

See commit 511ce378e16f ("mmc: Add MMC host software queue support")

Introduced in 5.8, this feature lets the block layer issue up to 2
pending requests to the MMC layer which in certain cases can improve
throughput, but in the case of this driver can significantly reduce
context switching when performing random reads.

On bcm2837 with a performant class A1 card, context switches under FIO
random 4k reads go from ~8800 per second to ~5800, with a reduction in
hardIRQs per second from ~5800 to ~4000. There is no appreciable
difference in throughput.

For bcm2835, and for workloads other than random read, HSQ is a wash in
terms of throughput and CPU load.

So, use it by default.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
drivers/mmc/host/Kconfig
drivers/mmc/host/bcm2835-sdhost.c