Skip to content

Slow memory card performance on N800 with OS2008

After I released my latest kernel with 48MHz support for accessing MMC and SD cards, a couple of readers noticed that the card performance was surprisingly low (around 4MB/s) which was way slower than I saw when I did testing way back when. Lucky, I kept those old results around and the fastest card I have was reporting 12.9MB/s and it too is now doing 4.something. That’s not good. The really weird part is that the transfer rate seems to *increase* when I put load on the CPU! Obviously, there’s a dimishing returns behaviour here but certainly if I put ~20% load on the CPU, I see the transfer rate increase by about 50%.

So, given that, it seems like there’s something funky going on with the cpu power conservation and it’s not speeding up when it needs to to maximise the data transfers.

I’ve filed bug 2838 for this problem.

In the meantime, my 48MHz patch is rather accademic as you’re never going to reach the hardware limits.

My n810 is now in the mail and I’ll report if I see any difference in behaviour.

{ 3 } Comments

  1. Matt Reimer | 25th January 2008 at 23:18 | Permalink

    It sounds like cpufreq is slowing the clock down, or more likely the parent clock. Maybe there’s a way to have the SD driver give cpufreq some feedback so it knows to turn the clock speed back up. Or maybe you could have the SD driver register a cpufreq handler to veto the clock slowdown.


  2. Yann B. | 25th January 2008 at 23:36 | Permalink

    I tried reading 32Mb on my SD card with 165Mhz clock speed and 400Mhz. In the first case, I got 4.5Mb/s, and in the second, 8.9Mb/s, so you’re true ;-)
    When you read a video, as it change the cpu speed to 400Mhz, you get the read speed improvement. But if you want reading speed without loading the cpu, “echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq”.

  3. Collin | 26th January 2008 at 03:59 | Permalink

    Matt is right, you need to register with the cpufreq handler in order to recalculate the SD/MMC bus frequency divider. I actually thought that this is implemented in the omap2 mmc driver…

Post a Comment

Your email is never published nor shared. Required fields are marked *