linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] mmc: renesas_sdhi: improve performance by changing max_segs
@ 2019-05-22 10:18 Yoshihiro Shimoda
  2019-05-22 10:18 ` [PATCH v3 1/3] mmc: tmio: No memory size limitation if runs on IOMMU Yoshihiro Shimoda
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yoshihiro Shimoda @ 2019-05-22 10:18 UTC (permalink / raw)
  To: ulf.hansson, wsa+renesas; +Cc: linux-mmc, linux-renesas-soc, Yoshihiro Shimoda

This patch set is based on renesas-drivers.git /
renesas-drivers-2019-05-21-v5.2-rc1 tag.

Since SDHI host internal DMAC of the R-Car Gen3 cannot handle two or more
segments, the performance rate (especially, eMMC HS400 reading) is not good.
However, if IOMMU is enabled on the DMAC, since IOMMU will map multiple
scatter gather buffers as one contignous iova, the DMAC can handle the iova
as well and then the performance rate is possible to improve. In fact,
I have measured the performance by using bonnie++, "Sequential Input - block"
rate was improved on r8a7795. Please refer to the end of this email about
the performance. (I beleive if the performance is improved, the CPU load
is also increased.)

However, in case of a sdio card (especiialy some WiFi cards/drivers),
scatter gather buffers are possible to be not contiguous iova because
each scatter gather buffer has only about 1500 bytes, the DMAC cannot
handle it. So, this patch set adds init_card() ops to detect the card
type, and then the driver changes the max_segs if the DMAC is under
IOMMU environment and an sd card/mmc is detected.

Remarks: I mentioned that Gen2 with the SYS-DMAC basis environment can
also improve the perfomance on the public ML [1], but there was
a measurement error so that I didn't make a patch for SYS-DMAC.

Changes from v2 [2]:
 - Add some conditions in the init_card().
 - Add a comment in the init_card().
 - Add definitions for some "MAX_SEGS".

Changes from v1 [3]:
 - Remove adding init_card ops into struct tmio_mmc_dma_ops and
   tmio_mmc_host and just set init_card on renesas_sdhi_core.c.
 - Revise typos on "mmc: tmio: No memory size limitation if runs on IOMMU".
 - Add Simon-san's Reviewed-by on a tmio patch.

[1]
https://patchwork.kernel.org/patch/10940225/#22635487

[2]
https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=116729

[3]
https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=110485

---
kernel v5.2-rc1 + local patches + HS400,,,,,,,,,,,,,,,,,,,,,,,,,,
Buildroot 2019.02.1,,,,,,,,,,,,,,,,,,,,,,,,,,
Bonnie++ 1.03e : bonnie\+\+ -d ./ -s 8192 -r 4096 -b -u root,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,
environment,Size,Sequential Output - per char (K/sec),<- (CPU %),Sequential Output - block (K/sec),<- (CPU %),Sequential Output - rewrite (K/sec),<- (CPU %),Sequential Input - per char (K/sec),<- (CPU %),Sequential Input ? block (K/sec),<- (CPU %),Random seeks,<- (CPU %),files,Sequential Create,<- (CPU %),Sequential Read,<- (CPU %),Sequential Delete,<- (CPU %),Random Create,<- (CPU %),Random Read,<- (CPU %),Random Delete,<- (CPU %)
H3_max_segs_1_on_IOMMU,8G,80858,96,121466,28,60602,16,71712,95,121427,15,4128.5,11,16,678,3,+++++,+++,593,2,616,3,+++++,+++,603,3
H3_max_segs_512_on_IOMMU,8G,76637,91,132994,31,81478,20,74522,98,197325,26,4526.5,12,16,864,4,+++++,+++,821,4,814,4,+++++,+++,786,4
---

Yoshihiro Shimoda (3):
  mmc: tmio: No memory size limitation if runs on IOMMU
  mmc: tmio: Add a definition for default max_segs
  mmc: renesas_sdhi: use multiple segments if possible

 drivers/mmc/host/renesas_sdhi_core.c | 25 +++++++++++++++++++++++++
 drivers/mmc/host/tmio_mmc.h          |  1 +
 drivers/mmc/host/tmio_mmc_core.c     |  7 ++++---
 3 files changed, 30 insertions(+), 3 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2019-05-23  4:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 10:18 [PATCH v3 0/3] mmc: renesas_sdhi: improve performance by changing max_segs Yoshihiro Shimoda
2019-05-22 10:18 ` [PATCH v3 1/3] mmc: tmio: No memory size limitation if runs on IOMMU Yoshihiro Shimoda
2019-05-22 11:31   ` Wolfram Sang
2019-05-22 10:18 ` [PATCH v3 2/3] mmc: tmio: Add a definition for default max_segs Yoshihiro Shimoda
2019-05-22 11:33   ` Wolfram Sang
2019-05-22 10:18 ` [PATCH v3 3/3] mmc: renesas_sdhi: use multiple segments if possible Yoshihiro Shimoda
2019-05-22 11:35   ` Wolfram Sang
2019-05-22 12:29   ` Christoph Hellwig
2019-05-23  4:15     ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).