Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/2] mmc: renesas_sdhi: improve performance by using IOMMU
@ 2019-05-13  4:29 Yoshihiro Shimoda
  2019-05-13  4:29 ` [PATCH v2 1/2] mmc: tmio: No memory size limitation if runs on IOMMU Yoshihiro Shimoda
  2019-05-13  4:29 ` [PATCH v2 2/2] mmc: renesas_sdhi: use multiple segments if possible Yoshihiro Shimoda
  0 siblings, 2 replies; 10+ messages in thread
From: Yoshihiro Shimoda @ 2019-05-13  4:29 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-07-v5.1 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 all platforms (r8a7795, r8a77965 and r8a77990).
Please refer to the following URL about the performance.
(I beleive if the performance is improved, the CPU load is also increased.)

https://marc.info/?l=linux-renesas-soc&m=155625619320165&w=2

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.

Changes from v1 [1]:
 - 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/project/linux-renesas-soc/list/?series=110485


Yoshihiro Shimoda (2):
  mmc: tmio: No memory size limitation if runs on IOMMU
  mmc: renesas_sdhi: use multiple segments if possible

 drivers/mmc/host/renesas_sdhi_core.c | 13 +++++++++++++
 drivers/mmc/host/tmio_mmc_core.c     |  5 +++--
 2 files changed, 16 insertions(+), 2 deletions(-)

-- 
2.7.4


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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13  4:29 [PATCH v2 0/2] mmc: renesas_sdhi: improve performance by using IOMMU Yoshihiro Shimoda
2019-05-13  4:29 ` [PATCH v2 1/2] mmc: tmio: No memory size limitation if runs on IOMMU Yoshihiro Shimoda
2019-05-13  4:29 ` [PATCH v2 2/2] mmc: renesas_sdhi: use multiple segments if possible Yoshihiro Shimoda
2019-05-13  9:00   ` Wolfram Sang
2019-05-13  9:46     ` Yoshihiro Shimoda
2019-05-13 11:34       ` Yoshihiro Shimoda
2019-05-13 13:54         ` Wolfram Sang
2019-05-14  6:05       ` Yoshihiro Shimoda
2019-05-21 21:57         ` Wolfram Sang
2019-05-22  5:11           ` Yoshihiro Shimoda

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org
	public-inbox-index linux-renesas-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git