alistair23-linux/drivers/mmc/core
Baolin Wang 511ce378e1 mmc: Add MMC host software queue support
Now the MMC read/write stack will always wait for previous request is
completed by mmc_blk_rw_wait(), before sending a new request to hardware,
or queue a work to complete request, that will bring context switching
overhead and spend some extra time to poll the card for busy completion
for I/O writes via sending CMD13, especially for high I/O per second
rates, to affect the IO performance.

Thus this patch introduces MMC software queue interface based on the
hardware command queue engine's interfaces, which is similar with the
hardware command queue engine's idea, that can remove the context
switching. Moreover we set the default queue depth as 64 for software
queue, which allows more requests to be prepared, merged and inserted
into IO scheduler to improve performance, but we only allow 2 requests
in flight, that is enough to let the irq handler always trigger the
next request without a context switch, as well as avoiding a long latency.

Moreover the host controller should support HW busy detection for I/O
operations when enabling the host software queue. That means, the host
controller must not complete a data transfer request, until after the
card stops signals busy.

From the fio testing data in cover letter, we can see the software
queue can improve some performance with 4K block size, increasing
about 16% for random read, increasing about 90% for random write,
though no obvious improvement for sequential read and write.

Moreover we can expand the software queue interface to support MMC
packed request or packed command in future.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/4409c1586a9b3ed20d57ad2faf6c262fc3ccb6e2.1581478568.git.baolin.wang7@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2020-03-24 14:35:39 +01:00
..
block.c mmc: Add MMC host software queue support 2020-03-24 14:35:39 +01:00
block.h
bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
card.h
core.c mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard 2020-03-11 16:11:34 +01:00
core.h mmc: core: Re-work HW reset for SDIO cards 2019-11-14 16:28:56 +01:00
debugfs.c MMC core: 2019-07-11 18:11:21 -07:00
host.c mmc: core: Remove mmc_gpiod_request_*(invert_gpio) 2019-12-18 13:37:07 +01:00
host.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig
Makefile
mmc.c mmc: Add MMC host software queue support 2020-03-24 14:35:39 +01:00
mmc_ops.c mmc: core: Allow host controllers to require R1B for CMD6 2020-03-11 16:10:36 +01:00
mmc_ops.h
mmc_test.c mmc: core: no need to check return value of debugfs_create functions 2019-06-17 13:30:49 +02:00
pwrseq.c
pwrseq.h
pwrseq_emmc.c
pwrseq_sd8787.c
pwrseq_simple.c
queue.c mmc: Add MMC host software queue support 2020-03-24 14:35:39 +01:00
queue.h
quirks.h mmc: core: fix wl1251 sdio quirks 2019-11-15 09:59:19 +01:00
regulator.c
sd.c mmc: core: Fix init of SD cards reporting an invalid VDD range 2019-08-30 09:17:53 +02:00
sd.h
sd_ops.c
sd_ops.h
sdio.c mmc: core: Re-work HW reset for SDIO cards 2019-11-14 16:28:56 +01:00
sdio_bus.c mmc: core: Re-work HW reset for SDIO cards 2019-11-14 16:28:56 +01:00
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c mmc: core: Add sdio_retune_hold_now() and sdio_retune_release() 2019-06-18 13:30:32 +02:00
sdio_irq.c mmc: core: Fixup processing of SDIO IRQs during system suspend/resume 2019-09-11 16:10:19 +02:00
sdio_ops.c
sdio_ops.h
sdio_uart.c
slot-gpio.c mmc: core: Remove mmc_gpiod_request_*(invert_gpio) 2019-12-18 13:37:07 +01:00
slot-gpio.h