From patchwork Mon Dec 5 17:35:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5470 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1725723E0E for ; Mon, 5 Dec 2011 17:36:28 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id E6708A18191 for ; Mon, 5 Dec 2011 17:36:27 +0000 (UTC) Received: by mail-lpp01m010-f52.google.com with SMTP id m6so417470lag.11 for ; Mon, 05 Dec 2011 09:36:27 -0800 (PST) Received: by 10.152.122.34 with SMTP id lp2mr6728241lab.20.1323106587833; Mon, 05 Dec 2011 09:36:27 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs270332lal; Mon, 5 Dec 2011 09:36:27 -0800 (PST) Received: by 10.213.27.200 with SMTP id j8mr112891ebc.128.1323106585681; Mon, 05 Dec 2011 09:36:25 -0800 (PST) Received: from eu1sys200aog109.obsmtp.com (eu1sys200aog109.obsmtp.com. [207.126.144.127]) by mx.google.com with SMTP id x5si7373268eeb.213.2011.12.05.09.36.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 09:36:25 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.127 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.127; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.127 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) smtp.mail=ulf.hansson@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKTt0BEMhCr2muLd2coREV5rsv2wXzZjaD@postini.com; Mon, 05 Dec 2011 17:36:23 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id B987AC9; Mon, 5 Dec 2011 17:27:47 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6D1B19D8; Mon, 5 Dec 2011 17:36:13 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 03BEDA8065; Mon, 5 Dec 2011 18:36:06 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 5 Dec 2011 18:36:12 +0100 From: Ulf Hansson To: , Cc: Russell King , Ulf Hansson , Lee Jones , Per Forlin Subject: [PATCH 03/14] mmc: mmci: Increase max_segs from 16 to 128 Date: Mon, 5 Dec 2011 18:35:49 +0100 Message-ID: <1323106560-5218-4-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1323106560-5218-1-git-send-email-ulf.hansson@stericsson.com> References: <1323106560-5218-1-git-send-email-ulf.hansson@stericsson.com> MIME-Version: 1.0 A significant increase (10-20%) in performance throughput for USB mass storage is the reason for incrementing the value. By some reason the USB driver allocates buffers which requires a scattergather list to contain a lot more than 16 elements to get optimal performance. This change sets the maximum elements to 128. Tests with large reads and large writes (100 MiB) show that the throughput increase is significant for write (10% for this test) but not for read. Tests are run on a Linux host with ext4 FS on the gadget mass storage device. The sg-len still exceeds 16 for the read tests but the performance gain is low or nothing. Signed-off-by: Ulf Hansson Signed-off-by: Per Forlin Acked-by: Linus Walleij --- drivers/mmc/host/mmci.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 79e4143..49f153e 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -160,7 +160,7 @@ (MCI_RXFIFOHALFFULLMASK | MCI_RXDATAAVLBLMASK | \ MCI_TXFIFOHALFEMPTYMASK) -#define NR_SG 16 +#define NR_SG 128 struct clk; struct variant_data;