Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: HDD read ahead cache
From: Uwe Freese (mail_at_uwe-freese.de)
Date: 2002-08-13


Hello,

There is this idea (from February in Sourceforge) to read more data
from disk with the hope that it stores it in it's cache.

It should work like this:

Filling mp3 buffer the first time:
- read our 1,3 MB (?) part of a mp3 file into the ram
- read more 1,3 MB from the disk, but don't store it in ram
  (hdd cache should be filled with that)

Filling mp3 buffer 2nd time:
- read our 1,3 MB (?) part of a mp3 file into the ram, and
  it comes from the hdd cache (because we read that part of the file
  the last time already) and the hdd doesn't spin up

I changed drivers/fat.c in a really silly way, but it should read
twice the amount that the user requested every 2nd read.

That should work for simply playing a file. I think that one
fat_read(...) is made every time the buffer is filled (and don't know
if I'm wrong here).
Then I measured the time for reading and between the disk activity and
nothing changed.

Could please someone look into the code and tell me if the result of
this test is really that the hdd doen't use it's cache like we hoped
or if I only made a mistake in fat.c? Does anybody have an idea what
to change to create a usable test?

Bye, Uwe.


  • application/octet-stream attachment: fat.c



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa