From owner-freebsd-mobile@FreeBSD.ORG Sun Oct 12 13:46:16 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 626D5106569C for ; Sun, 12 Oct 2008 13:46:16 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id E0B558FC19 for ; Sun, 12 Oct 2008 13:46:15 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so908296fgb.35 for ; Sun, 12 Oct 2008 06:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=j8/6mHhAf3q3XlLakBu9Y91u/JJDeouiJu+aEf92HQA=; b=sWXKZqhGMpxXlyHgorrU0CJYiTabXE7Xw0Nx/XY2H3LIr7umo+dyaqKog+87ORsQLQ J7b6/ADk+k1/BkP/oHvChaMDXSQXUa6frHp4vhmbjRaVKn6Zs21MXBC1K6LXUf7GMv6l KwGQLQFY2Wp3isHA3b7KOSRHJZFMdsSrr0FAI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=i5GiKyUgsUVnnsaPYoMdqd7VqH/r0PrQqLM5p/jvuOiSNwYpCiRXdwvj5sqGj5bpoH CLCf0nHxqoxSC3EtmDYPmu+7eiuZ62T0YfcouZXuOj1XjvI5B+AtFCJnj6dPl6cVX4Nv wOD2V/qQsgjJ3S+hV6ur1R1Lln95hZnTMp9y4= Received: by 10.86.36.11 with SMTP id j11mr3961046fgj.7.1223819174610; Sun, 12 Oct 2008 06:46:14 -0700 (PDT) Received: by 10.86.28.5 with HTTP; Sun, 12 Oct 2008 06:46:14 -0700 (PDT) Message-ID: <53a1e0710810120646g36925f6fjafd3cfe92e485139@mail.gmail.com> Date: Sun, 12 Oct 2008 21:46:14 +0800 From: "Henry Hu" To: "Alexander Motin" In-Reply-To: <48F1E423.1000606@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48DEA8E7.2080503@FreeBSD.org> <48F11087.20403@FreeBSD.org> <53a1e0710810120339g66180c86n239c35bf2abf9467@mail.gmail.com> <48F1E423.1000606@FreeBSD.org> Cc: freebsd-mobile@freebsd.org Subject: Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2008 13:46:16 -0000 Just as you said, increasing bs leads to much better performance. > sudo dd if=/dev/mmcsd0 of=/dev/null bs=64k ^C279+0 records in 279+0 records out 18284544 bytes transferred in 2.315142 secs (7897807 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=64k ^C465+0 records in 465+0 records out 30474240 bytes transferred in 3.892817 secs (7828326 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=64k ^C559+0 records in 559+0 records out 36634624 bytes transferred in 4.967053 secs (7375525 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=128k ^C146+0 records in 146+0 records out 19136512 bytes transferred in 2.332850 secs (8203062 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=1024k ^C28+0 records in 28+0 records out 29360128 bytes transferred in 3.765376 secs (7797396 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=512k ^C75+0 records in 75+0 records out 39321600 bytes transferred in 4.945109 secs (7951615 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=256k ^C179+0 records in 179+0 records out 46923776 bytes transferred in 5.673761 secs (8270313 bytes/sec) > sudo dd if=/dev/mmcsd0 of=/dev/null bs=128k ^C247+0 records in 247+0 records out 32374784 bytes transferred in 4.377884 secs (7395076 bytes/sec) 2008/10/12 Alexander Motin : > Henry Hu wrote: >> >> I've tried your driver, and it worked fine at my laptop. >> I have a Samsung R70, with built-in SD card reader(in fact, it can >> read many cards, and there are 4 unknown devices related to it).The >> transfer speed with dd bs=512 is almost 800KB/s, which I think is >> fairly fast. > > bs=512 is a quite ineffective for any modern storage. With bigger bs you > should get much bigger performance I think. > >> I'm testing it with a transcend 2G mini SD card, with SD-miniSD adapter. >> I'm using 7-STABLE, so I changed kproc_create to kthread_create to >> compile the mmcsd module. >> There are errors, but the transfer completed normally. >> sdhci0-slot0: Card inserted >> mmc0: on sdhci0 >> sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) >> sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) > > This is not a problem. It means that your card does not support SDHC CMD8 > command as it is not an SDHC actually. > >> mmcsd0: 1950MB at mmc0 16MHz/4bit > > It means that top performance of this card on this controller is about > 8MB/s. I expect that you may reach it on read operations if your card is not > very old. > > -- > Alexander Motin >