Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2014 14:38:30 +0100
From:      Svatopluk Kraus <onwahe@gmail.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Pandaboard ES and SD card
Message-ID:  <CAFHCsPVh0QKeyO6NFF1kqzACAHiD8c6uNWewDwqpRZiET%2BjJKQ@mail.gmail.com>
In-Reply-To: <1393977031.1149.325.camel@revolution.hippie.lan>
References:  <CAFHCsPXRXvN1XxnM9-B3iLZ%2BU=y6UgunQY8QBdyA0xESx3C1Bw@mail.gmail.com> <1393977031.1149.325.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 5, 2014 at 12:50 AM, Ian Lepore <ian@freebsd.org> wrote:

>  On Mon, 2014-03-03 at 17:12 +0100, Svatopluk Kraus wrote:
> > Hi,
> >
> > I finally have found time to install FreeBSD 11.0-CURRENT on Pandaboard
> ES
> > on my table. It's been installed to SD card.  When I boot to multiuser,
> > it's very very slow. It looks that SD card write performance is very
> poor.
> > When I boot to singleuser, it's OK. However, when I make root filesystem
> > read-write by one command and immediately readonly by second one, the
> > second one takes a few minutes to finish.
> >
> > When I've digged in arm/ti/ti_mmchs.s, I've got following times for READ
> > and WRITE commands:
> >
> > typical read times (start & duration & command),
> > ...
> > [1393858258.909d4fb4650dcb70] [0.002f97afec8ba994] READ
> > [1393858258.929795e2f7db5ec0] [0.002f90d496ec7d4c] READ
> > [1393858258.9492673f18af4ec0] [0.002f9d607a66e41c] READ
> > [1393858258.968d155674da0d5e] [0.002f937e2ea37cca] READ
> > [1393858258.988790d78e6fd5a2] [0.002f9eb09b235414] READ
> > [1393858258.9a78744ecab1413e] [0.002f90dded2a9cda] READ
> > [1393858258.9c735a3cec62b616] [0.002f97cbef46083e] READ
> > [1393858258.9e6ee0b8064ec2aa] [0.002f933cd2f09fe8] READ
> > [1393858258.a069e2838966634a] [0.002f959262788368] READ
> > [1393858258.a26467518add9a00] [0.002f8f9722ac4c70] READ
> > [1393858258.a45e59f14fb6c986] [0.002f9d31cb304656] READ
> > [1393858258.a659525d3e70bc98] [0.002f8ae2ad5e65e2] READ
> > [1393858258.a853df0c0452931e] [0.002f9cd46cc30aca] READ
> > ...
> >
> > typical write times (start & duration & command).
> > ...
> > [1393856255.8be604dff29d07a0] [0.00d9cf712d331d58] WRITE
> > [1393856255.8e9100859c4fedd2] [0.00da3f856cebe4e6] WRITE
> > [1393856255.913c1530607b6288] [0.00da8f1a826cd93a] WRITE
> > [1393856255.93e7b97bcc483d9a] [0.00dad6ced3832dbe] WRITE
> > [1393856255.9693e68c8a1752c0] [0.2276ea0a1d732724] WRITE     <-
> > [1393856255.badca6f90c5564ea] [0.22df71f44f623e3e] WRITE     <-
> > [1393856255.df8e42a6890234a4] [0.24ae2f1172203ed0] WRITE     <-
> > [1393856256.060e4c7acd0c290a] [0.00e76cb09c67c3ba] WRITE
> > [1393856256.08c68da8b0554498] [0.00e7b1d75881776a] WRITE
> > [1393856256.0b7f57d3eb15578e] [0.00e83c08cdfa8020] WRITE
> > [1393856256.0e36d38be88f1e08] [0.00e882dd093ddf54] WRITE
> > [1393856256.10f0762d8d8cbe10] [0.00e8c0f06a43a968] WRITE
> > [1393856256.13aa6a2dc9ef5c9a] [0.00e938916637f4c8] WRITE
> > [1393856256.1664fc08109773d4] [0.22b74fce5c0401e2] WRITE     <-
> > [1393856256.3aedb9baa4273c8e] [0.2305517892cef37c] WRITE     <-
> > [1393856256.5fc52a62081f2238] [0.24aaf338d2067a84] WRITE     <-
> > [1393856256.8641d9129fd99066] [0.00e770cfadd3b168] WRITE
> > [1393856256.88fae819e4c25a9c] [0.04d7472f5f571cbc] WRITE
> > ...
> >
> > Times are struct bintime printed in %lld.%016llx (sec.frac) format.
> >
> > Writing times have got really big variation.
> > Any idea or experience?
> >
> > Svatopluk Kraus
> >
> >  PS. Of course, I don't mention occasional "Spurious interrupt detected"
> > print.
>
> The ti_mmchs driver does all IO one sector at a time, and single-sector
> writes are the worst case for sdcard performance.  I've seen
> single-sector writes go as slow as 20K/sec.
>
Well, at least I'm not alone. Thanks for sharing your experience.


> Try switching to the ti_sdhci driver (switch the entry in files.omap4).
> I don't know for sure that ti_sdhci will work with pandaboard, it's only
> been tested on beaglebone that I know of.  But if it works you should
> see read speeds around 16MB/sec and writes at about 7MB/sec.
>
I've tried to switch to it. However, it does not work. Inserted card is not
detected and when it's hacked, the card is not recognized.

% mmc0: <MMC/SD bus> on sdhci_ti0
% mmc0: SD probe: failed
% mmc0: MMC probe: failed
% mmc0: Current OCR: 0x00000000
% mmc0: No compatible cards found on bus

When ti_sdhci.c and sdhci.c are compared with ti_mmchs.c, there are many
things implemented differently. HW initialization is more complex in
ti_mmchs.c and some things are even missing in ti_shdci.c (and its MI part
sdhci.c). I'm not sure what is better to start with. To implement
multi-block mode into ti_mmchs.c or to fix ti_shdci.c. The first looks
easier for me. The second can lead to either fixing MI sdhci.c and/or
bypassing it in large.



> The "mount -uw / ; mount -ur /" is a completely separate thing.  That
> takes about 30 seconds on every sdcard-based system I have.  I don't
> know why, but it's really annoying.  I don't think it's a driver thing,
> it happens with several different drivers.
>
> -- Ian


Hmmm, so in my case it's only much worse.

Svatopluk Kraus



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFHCsPVh0QKeyO6NFF1kqzACAHiD8c6uNWewDwqpRZiET%2BjJKQ>