[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f71672cc699900b57d257c56b325e185f2b6fdd9.camel@mediatek.com>
Date: Fri, 25 Aug 2023 07:10:50 +0000
From: Sharp Xia (夏宇彬) <Sharp.Xia@...iatek.com>
To: "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
wsd_upstream <wsd_upstream@...iatek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH 1/1] mmc: Set optimal I/O size when mmc_setip_queue
On Thu, 2023-08-24 at 12:55 +0200, Ulf Hansson wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On Fri, 18 Aug 2023 at 04:45, <Sharp.Xia@...iatek.com> wrote:
> >
> > From: Sharp Xia <Sharp.Xia@...iatek.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.
>
> This seems reasonable to me. However, it would be nice if you could
> share some performance numbers too - comparing before and after
> $subject patch.
>
> Kind regards
> Uffe
>
> >
> > Signed-off-by: Sharp Xia <Sharp.Xia@...iatek.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(hos
> t)),
> > --
> > 2.18.0
> >
I test this patch on internal platform(kernel-5.15).
Before:
console:/ # echo 3 > /proc/sys/vm/drop_caches
console:/ # dd if=/mnt/media_rw/8031-130D/super.img of=/dev/null
4485393+1 records in
4485393+1 records out
2296521564 bytes (2.1 G) copied, 37.124446 s, 59 M/s
console:/ # cat /sys/block/mmcblk0/queue/read_ahead_kb
128
After:
console:/ # echo 3 > /proc/sys/vm/drop_caches
console:/ # dd if=/mnt/media_rw/8031-130D/super.img of=/dev/null
4485393+1 records in
4485393+1 records out
2296521564 bytes (2.1 G) copied, 28.956049 s, 76 M/s
console:/ # cat /sys/block/mmcblk0/queue/read_ahead_kb
1024
Powered by blists - more mailing lists