summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mmc_hsq.h
diff options
context:
space:
mode:
authorWenchao Chen <wenchao.chen@unisoc.com>2023-09-19 10:47:07 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2023-09-27 13:13:18 +0300
commit68df98c48398e68e7f187b5ee92fb2576d6fd7d1 (patch)
tree5ec0795a196b429c9d416b5d5ee68ed7a833fb8a /drivers/mmc/host/mmc_hsq.h
parent2e2b547950bc09e75afe912f9683be39c2195d9d (diff)
downloadlinux-68df98c48398e68e7f187b5ee92fb2576d6fd7d1.tar.xz
mmc: hsq: Improve random I/O write performance for 4k buffers
By dynamically adjusting the host->hsq_depth, based upon the buffer size being 4k and that we get at least two I/O write requests in flight, we can improve the throughput a bit. This is typical for a random I/O write pattern. More precisely, by dynamically changing the number of requests in flight from 2 to 5, we can on some platforms observe ~4-5% increase in throughput. Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com> Link: https://lore.kernel.org/r/20230919074707.25517-3-wenchao.chen@unisoc.com [Ulf: Re-wrote the commitmsg, minor adjustment to the code - all to clarify.] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mmc_hsq.h')
-rw-r--r--drivers/mmc/host/mmc_hsq.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmc_hsq.h b/drivers/mmc/host/mmc_hsq.h
index aa5c4543b55f..dd352a6ac32a 100644
--- a/drivers/mmc/host/mmc_hsq.h
+++ b/drivers/mmc/host/mmc_hsq.h
@@ -10,6 +10,11 @@
* flight to avoid a long latency.
*/
#define HSQ_NORMAL_DEPTH 2
+/*
+ * For 4k random writes, we allow hsq_depth to increase to 5
+ * for better performance.
+ */
+#define HSQ_PERFORMANCE_DEPTH 5
struct hsq_slot {
struct mmc_request *mrq;