public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mmc: Set optimal I/O size when mmc_setip_queue
@ 2023-08-18  2:28 Sharp.Xia
  2023-08-24 10:55 ` Ulf Hansson
  0 siblings, 1 reply; 13+ messages in thread
From: Sharp.Xia @ 2023-08-18  2:28 UTC (permalink / raw)
  To: Ulf Hansson, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: wsd_upstream, Sharp Xia, linux-mmc, linux-kernel,
	linux-arm-kernel, linux-mediatek

From: Sharp Xia <Sharp.Xia@mediatek.com>

MMC does not set readahead and uses the default VM_READAHEAD_PAGES
resulting in slower reading speed.
Use the max_req_size reported by host driver to set the optimal
I/O size to improve performance.

Signed-off-by: Sharp Xia <Sharp.Xia@mediatek.com>
---
 drivers/mmc/core/queue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index b396e3900717..fc83c4917360 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -359,6 +359,7 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
 		blk_queue_bounce_limit(mq->queue, BLK_BOUNCE_HIGH);
 	blk_queue_max_hw_sectors(mq->queue,
 		min(host->max_blk_count, host->max_req_size / 512));
+	blk_queue_io_opt(mq->queue, host->max_req_size);
 	if (host->can_dma_map_merge)
 		WARN(!blk_queue_can_use_dma_map_merging(mq->queue,
 							mmc_dev(host)),
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-28  9:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18  2:28 [PATCH 1/1] mmc: Set optimal I/O size when mmc_setip_queue Sharp.Xia
2023-08-24 10:55 ` Ulf Hansson
2023-08-25  7:10   ` Sharp Xia (夏宇彬)
2023-08-25  8:11     ` Shawn Lin
2023-08-25  8:39       ` Sharp.Xia
2023-08-25  9:17         ` Shawn Lin
2023-08-26 16:26           ` Sharp.Xia
2023-08-28  2:27             ` Shawn Lin
2023-08-28  9:04               ` Ulf Hansson
2023-08-25 12:23         ` Wenchao Chen
2023-08-26 16:54           ` Sharp.Xia
2023-08-25  7:25   ` Sharp.Xia
2023-08-25  7:26   ` Sharp.Xia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox