Thread (56 messages) 56 messages, 12 authors, 2011-04-28
STALE5530d

[PATCH] mmc: sdhci: add support for pre_req and post_req

From: Andrei Warkentin <hidden>
Date: 2011-04-27 00:59:19
Also in: linux-mmc
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, secure digital host controller interface (sdhci) driver, the rest · Maintainers: Ulf Hansson, Adrian Hunter, Linus Torvalds

Hi,

On Fri, Apr 22, 2011 at 6:01 AM, Jaehoon Chung [off-list ref] wrote:
Hi Andrei..

Did you test this patch with ADMA?
I wonder that be increased performance or others..
FWIW...

ADMA

With changes

adb shell "echo 0 > /sys/module/sdhci/parameters/no_prepost"
time adb shell "iozone -a -f /cache/file -g 4m > /mnt/obb/with"

real	0m37.245s
user	0m0.010s
sys	0m0.000s

Without changes

adb shell "echo 1 > /sys/module/sdhci/parameters/no_prepost"
time adb shell "iozone -a -f /cache/file -g 4m > /mnt/obb/without"

real	0m38.400s
user	0m0.000s
sys	0m0.010s

SDMA plus BOUNCE_BUFFER

With changes

adb shell "echo 0 > /sys/module/sdhci/parameters/no_prepost"
time adb shell "iozone -a -f /cache/file -g 4m > /mnt/obb/with"

real	0m37.999s
user	0m0.000s
sys	0m0.010s

Without changes

adb shell "echo 1 > /sys/module/sdhci/parameters/no_prepost"
time adb shell "iozone -a -f /cache/file -g 4m > /mnt/obb/without"

real	0m39.717s
user	0m0.000s
sys	0m0.010s

Collected data using this patch on top of Shawn's...
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3320c75..f698586 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -39,6 +39,7 @@
 #endif

 static unsigned int debug_quirks = 0;
+static unsigned int no_prepost = 0;

 static void sdhci_prepare_data(struct sdhci_host *, struct mmc_data *);
 static void sdhci_finish_data(struct sdhci_host *);
@@ -1140,6 +1141,8 @@ static void sdhci_pre_req(struct mmc_host *mmc,
struct mmc_request *mrq,
                          bool is_first_req)
 {
        struct sdhci_host *host = mmc_priv(mmc);
+       if (no_prepost)
+               return;

        if (mrq->data->host_cookie) {
                mrq->data->host_cookie = 0;
@@ -1157,6 +1160,9 @@ static void sdhci_post_req(struct mmc_host *mmc,
struct mmc_request *mrq,
        struct sdhci_host *host = mmc_priv(mmc);
        struct mmc_data *data = mrq->data;

+       if (no_prepost)
+               return;
+
        if (host->flags & SDHCI_REQ_USE_DMA) {
                dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
                             (data->flags & MMC_DATA_WRITE) ?
@@ -2163,6 +2169,7 @@ module_init(sdhci_drv_init);
 module_exit(sdhci_drv_exit);

 module_param(debug_quirks, uint, 0444);
+module_param(no_prepost, uint, 0644);

 MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
 MODULE_DESCRIPTION("Secure Digital Host Controller Interface core driver");

A
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help