From: Faiz Abbas <faiz_abbas@ti.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
linux-mmc@vger.kernel.org
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: MMC performance degradation due to too many requests
Date: Mon, 14 May 2018 17:00:56 +0530 [thread overview]
Message-ID: <0ea1d2bf-fa0f-4b3d-556a-5dca5afbf2a9@ti.com> (raw)
Hi Everyone,
I am debugging a performance degradation issue in some SD cards which
happened around 4.13 kernel on TI's AM335x-evm.
I compare the time taken for a simple dd command (after dropping
caches) to run between kernel versions 4.13 and 4.14. I see that there
is a consistent 15-20% reduction in speed. The amount of decrease
depends on the card used.
command:
# echo 3 > /proc/sys/vm/drop_caches; dd if=/dev/zero of=/dev/mmcblk1p2
bs=1M count=100;
v4.13
~22s for 100M transfer
v4.14
~28s for 100M transfer
Also, I see many times the number of interrupts for mmc1 in 4.14.
v4.14
34: 2122 INTC 64 Level mmc1
v4.13
162: 457 INTC 64 Level mmc1
This increase of interrupts also exists in the latest kernel.
I also printed out the size of the DMA transfers in the omap_hsmmc
driver during the dd command. I see that the maximum size of the dma
transfer has decreased from 1 MB to 256kB between 4.13 and 4.14.
Full log:
v4.13
https://pastebin.ubuntu.com/p/gK2k9GZcNd/
v4.14
https://pastebin.ubuntu.com/p/3YzCbQ79rk/
It looks like something has started splitting the request into 4 times
as many smaller buffers and this is what is causing the performance
decrease.
I also ran the ftrace function profile tool on mmc* and blk* functions
and see that the function mmc_blk_issue_rq() is where the program spends
most of its time and the calls to that and other related functions have
increased around 4 times with the average time per call being reduced.
Function profile Log:
v4.13
https://pastebin.ubuntu.com/p/R5JG6FpTvy/
v4.14
https://pastebin.ubuntu.com/p/Kc6QYYwYcN/
I am not sure why calls to mmc_blk_issue_rq() have increased by so much.
Any ideas why this could be happening?
Thanks,
Faiz
next reply other threads:[~2018-05-14 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 11:30 Faiz Abbas [this message]
2018-05-14 16:41 ` MMC performance degradation due to too many requests Tony Lindgren
2018-05-15 12:39 ` Linus Walleij
2018-05-15 15:11 ` Faiz Abbas
2018-05-16 14:29 ` Linus Walleij
2018-05-17 12:54 ` Faiz Abbas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0ea1d2bf-fa0f-4b3d-556a-5dca5afbf2a9@ti.com \
--to=faiz_abbas@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox