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



Rockbox mail archive

Subject: Power saving and ATA

Power saving and ATA

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Fri, 11 Apr 2003 03:23:36 +0200

I reviewed the CPU SLEEP implementation and came across this code in ata.c:

     while (TIME_BEFORE(current_tick, timeout) &&
            !(ATA_ALT_STATUS & STATUS_RDY))
         sleep_thread();
     wake_up_thread();

I wonder if this is good behaviour. If the hard disk is just a little
slow and the status isn't set yet, the thread goes to sleep and won't
wake up until the next tick interrupt (or the DMA or MP3 tick
interrupt). This means that the ATA driver waits several milliseconds
too long for every status poll, worst case is 10ms. The Player models
are better off, since the MP3 tick interval is only 2ms.

I think we should favour ATA performance in this case, rather than
saving a few microamps from the CPU. Unnecessary sleep with the HD
running seems like a bad idea anyway.

/Linus
Received on 2003-04-11

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy