XO-1.5 slow disk writes

Peter Robinson pbrobinson at gmail.com
Tue Nov 17 12:49:50 EST 2009


Hi Daniel,

> Today I tried to figure out why running "sync" often takes 5-10 seconds
> or longer. This slows down suspend, where all data is synced to disk.
> In all cases that I looked at, the amount of data being synced was tiny.
> One example: in one run it had 160kB data to sync and it took 7.7
> seconds. (blktrace is very handy for figuring this out)
>
> I traced this all the way to the SDHCI driver. These writes are
> typically small and scattered, and our hardware (or the card itself)
> takes a long time to process them. Many of the 1024 byte writes take
> 500-600ms. All other disk I/O is halted during these times. The delay is
> purely after submitting the SDHCI write command, and waiting for the
> completion interrupt to arrive.
>
> I then wrote a C application to reproduce the exact set of writes from a
> 20-second sync that I logged (using random data, but the same sectors,
> sizes and ordering) and reproduced the issue that way.
>
> I also moved the card over to my Dell laptop, ran the same program and
> saw the same (terrible) results.
>
> All info here:
> http://dev.laptop.org/ticket/9688
>
>
> So, I have a feeling that at least with today's generation of miniSD
> cards we're going to be stuck with bad write performance, particularly
> for random-style access like this.
>
> One experiment that would be interesting to run would be to try this on
> one of the PhoenixBIOS boards, and then try it with the exact same SD
> card on a regular XO-1.5. Just in case...

You might want to look at some of the SD/MMC frequency patches that he
applies to the kernel for the Nokia Internet tablet devices. I think
the default kernel defaults to a frequency half or even less than
half. The issue that might be encountered is that it doesn't always
work well on low quality SD cards but it would be at least worth
experimenting with it.

His blog is here
http://intr.overt.org/blog/

The patches and a readme about them are here for the Nokia device (I
suspect they're just about the same everywhere).
http://intr.overt.org/5.2008.43-mmc-kernel/

Hope that can be of some help, or at least head you in the right direction.

Cheers,
Peter



More information about the Devel mailing list