Information on XO-1 power efficiency

Paul Fox pgf at laptop.org
Wed Nov 11 16:46:12 EST 2009


hal wrote:
 > 
 > pgf at laptop.org said:
 > > certainly -- you can point out that our latencies for waking/ sleeping
 > > are just a little too long (mainly due to USB device discovery) to
 > > make that feature comfortable to use "between key-strokes".
 > 
 > How well does sleep-between-keystrokes work if I ignore USB?

better -- i think we wake in under a second with the wireless driver
module unloaded.

 > Has anything interesting changed in this area for XO-1.5?

yes.  wireless isn't connected with USB -- it uses SDIO.  for better
or worse.

 > Is USB device discover inherently slow?  Or is the sloth just
 > handling strange cases?  Can I speed things up if I only need
 > to verify that devices I knew about are still there?

you're clearly welcome to tackle this.  i think we'd even welcome
a patch that short-circuited the whole discover stack for wireless,
and hard-coded the answer regarding what device is present on that
port.

 > Has anybody tried to work out the details of when USB needs to be 
 > re-discovered?
 > 
 > Is there a blog/wiki page on this area?  If so, where, and sorry for the 
 > clutter.

there's certainly a lot of history, in the archives for this list, and
possibly on the wiki.

 > 
 > My checklist would be something like:
 > 
 >   On XO-1, WiFi is on USB, but there is a separate wakeup line for it so we 
 > don't need to turn on USB because of WiFi unless it has a packet or we want 
 > to send something.

the driver will still probe for the device.

paul

 > 
 >   Disks and SD cards don't need attention unless we want to do something... 
 > [1]
 > 
 >   For things like keyboards and serial adapters and probably many 
 > toys/gizmos, we have to leave USB running in order to notice when they need 
 > attention.  That means leaving the CPU on too.  We don't need to do that if 
 > the device isn't in use (file not open).
 > 
 >   We might need an ioctl to tell the kernel whether a device needs to be 
 > polled (keyboard case) vs ignored unless we expect something (disk).  I think 
 > we can make a good guess at compile time, but we might need a tool to tell 
 > the kernel how to handle strange devices.  (udev might help)
 > 
 >   User code might need tweaking to tell the kernel when a device can/can't be 
 > powered down, either by an ioctl or by closing/reopening the device.
 > 
 >   If the CPU is powered down, it won't notice when a new USB device gets 
 > plugged in or one is unplugged.  I think I could live with that for serious 
 > power savings, especially since no-USB is the common case.  You would have to 
 > poke a special key or something like that to get the CPU to do USB device 
 > discovery.
 > 
 > --------
 > 
 > 1) Disks aren't really that simple.  If the CPU is off you won't notice when 
 > the disk gets unplugged.  So somebody could unplug a disk, take it to another 
 > CPU, read/write some files, bring the disk back to the still sleeping XO, and 
 > the XO would never notice.  If the XO had cached data in memory, that data 
 > needs to get flushed.  If the XO had dirty pages in memory, you are in 
 > trouble.  Open files should probably get errors.  There is probably a mount 
 > count/time that could be checked to catch this case.
 > 
 > 
 > -- 
 > These are my opinions, not necessarily my employer's.  I hate spam.
 > 
 > 
 > 
 > _______________________________________________
 > Devel mailing list
 > Devel at lists.laptop.org
 > http://lists.laptop.org/listinfo/devel

=---------------------
 paul fox, pgf at laptop.org



More information about the Devel mailing list