XO-1.5 slow disk writes

Daniel Drake dsd at laptop.org
Tue Nov 17 12:26:31 EST 2009


Hi,

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...

Daniel





More information about the Devel mailing list