]> asedeno.scripts.mit.edu Git - linux.git/commit
mmc: Throttle calls to MMC_SEND_STATUS during mmc_do_erase()
authorMartin Hicks <mort@bork.org>
Mon, 28 May 2018 11:23:04 +0000 (13:23 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 29 May 2018 10:24:26 +0000 (12:24 +0200)
commit833b51170feeee1718990480f792bb05cb0ca17c
tree39ea333ae72b83fd6729c8f862ed2cbe8788259d
parenta6720c023af24220f3f26459c0aa156260a84aa0
mmc: Throttle calls to MMC_SEND_STATUS during mmc_do_erase()

This drastically reduces the rate at which the MMC_SEND_STATUS cmd polls
for completion of the MMC Erase operation.  The patch does this by adding
a backoff sleep that starts by sleeping for short intervals (128-256us),
and ramps up to sleeping for 32-64ms.

Even on very quickly completing erase operations, the loop iterates a few
times, so not too much extra latency is added to these commands.

For long running discard operarations, like a full-device secure discard,
this change drops the interrupt rates on my single-core NXP I.MX6UL from
45000/s to about 20/s, and greatly improves system responsiveness.

Signed-off-by: Martin Hicks <mort@bork.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c