From patchwork Wed Apr 27 00:59:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Warkentin X-Patchwork-Id: 1184 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:59 -0000 Delivered-To: patches@linaro.org Received: by 10.224.2.73 with SMTP id 9cs91914qai; Tue, 26 Apr 2011 17:59:26 -0700 (PDT) Received: by 10.68.24.40 with SMTP id r8mr1528326pbf.161.1303865965048; Tue, 26 Apr 2011 17:59:25 -0700 (PDT) Received: from exprod5og114.obsmtp.com (exprod5og114.obsmtp.com [64.18.0.28]) by mx.google.com with SMTP id j5si472282pbp.254.2011.04.26.17.59.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Apr 2011 17:59:25 -0700 (PDT) Received-SPF: neutral (google.com: 64.18.0.28 is neither permitted nor denied by best guess record for domain of fjnh84@motorola.com) client-ip=64.18.0.28; Authentication-Results: mx.google.com; spf=neutral (google.com: 64.18.0.28 is neither permitted nor denied by best guess record for domain of fjnh84@motorola.com) smtp.mail=fjnh84@motorola.com Received: from DE01MGRG01.AM.MOT-MOBILITY.COM ([192.54.82.14]) (using TLSv1) by exprod5ob114.postini.com ([64.18.4.12]) with SMTP ID DSNKTbdqanrHUsq9MUmxj/3VKV9mtWP4MwJw@postini.com; Tue, 26 Apr 2011 17:59:24 PDT Received: from DE01MGRG01.AM.MOT-MOBILITY.COM ([10.22.94.168]) by DE01MGRG01.AM.MOT-MOBILITY.COM (8.14.3/8.14.3) with ESMTP id p3R0xlV6002062; Tue, 26 Apr 2011 20:59:47 -0400 (EDT) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by DE01MGRG01.AM.MOT-MOBILITY.COM (8.14.3/8.14.3) with ESMTP id p3R0xjkc002032 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK); Tue, 26 Apr 2011 20:59:46 -0400 (EDT) Received: by wwb28 with SMTP id 28so1254311wwb.3 for ; Tue, 26 Apr 2011 17:59:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.61.5 with SMTP id v5mr5149148wec.74.1303865959503; Tue, 26 Apr 2011 17:59:19 -0700 (PDT) Received: by 10.216.157.145 with HTTP; Tue, 26 Apr 2011 17:59:19 -0700 (PDT) In-Reply-To: <4DB16019.8000800@samsung.com> References: <1302116833-24540-1-git-send-email-per.forlin@linaro.org> <1302972516-8673-1-git-send-email-shawn.guo@linaro.org> <4DB16019.8000800@samsung.com> Date: Tue, 26 Apr 2011 19:59:19 -0500 Message-ID: Subject: Re: [PATCH] mmc: sdhci: add support for pre_req and post_req From: Andrei Warkentin To: Jaehoon Chung Cc: Shawn Guo , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, cjb@laptop.org, per.forlin@linaro.org, Kyungmin Park X-CFilter-Loop: Reflected Hi, On Fri, Apr 22, 2011 at 6:01 AM, Jaehoon Chung 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... 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 "); MODULE_DESCRIPTION("Secure Digital Host Controller Interface core driver"); A 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) {