Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2008 21:46:14 +0800
From:      "Henry Hu" <henry.hu.sh@gmail.com>
To:        "Alexander Motin" <mav@freebsd.org>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements
Message-ID:  <53a1e0710810120646g36925f6fjafd3cfe92e485139@mail.gmail.com>
In-Reply-To: <48F1E423.1000606@FreeBSD.org>
References:  <48DEA8E7.2080503@FreeBSD.org> <48F11087.20403@FreeBSD.org> <53a1e0710810120339g66180c86n239c35bf2abf9467@mail.gmail.com> <48F1E423.1000606@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mav@freebsd.org>:
> 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: <MMC/SD bus> 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 <SD Memory Card> 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
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53a1e0710810120646g36925f6fjafd3cfe92e485139>