Re: Information on XO-1 power efficiency

2009-11-17 Thread John Gilmore
 How well does sleep-between-keystrokes work if I ignore USB?

Pretty well -- but check bugs.laptop.org.  That's where our institutional
memory of the bugs that prevented full blown suspend exists.  Search for
power or suspend or sleep.

If you're serious about working on this, I can spend some time looking
in there for the next low hanging fruit.  I remember there were some
high priority bugs we were trying to shoot.  When OLPC had to fire most
of the software team for lack of money, and focus down its efforts
on what its country partners wanted, Chris and I stopped working on
improving power consumption.

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

Lots, though as far as I know, auto-suspend on XO-1.5 is not working
yet.

 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?

Bringing up the USB bus is apparently *designed* to take a large
fraction of a second.  After you turn on USB bus power, you have to
wait for X hundred milliseconds for the power to stabilize and for any
devices to come out of power-on reset.  Ditto after you turn on USB
signalling.

The way to play with this is to unload the USB module from the XO-1
kernel.  Then it won't play any part in suspend/resume.  (This will lose
you the WiFi.)  You'll be left with something that suspends in ~250 ms
and resumes in ~400 ms as I recall.  Resume time with USB is 900 ms.

To fix this, refactor the USB startup code so that it runs
asynchronously on resume (i.e. it doesn't prevent the kernel from
starting to run user programs).  This should produce a kernel that
resumes in about the same amount of time, whether or not you have a
USB module loaded.  The trick is probably to manage this in a way that
upstream will accept.

John

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Information on XO-1 power efficiency

2009-11-17 Thread John Watlington

On Nov 11, 2009, at 3:04 PM, Hal Murray wrote:

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

YES!

XO-1.5 no longer uses any USB devices internally.   We used
SDIO instead.   This not only provides lower power operation
to start with, it also should allow us to suspend/resume much faster.

The peak bus throughput is much lower than USB 2.0's potential,
but still reasonable for 802.11b/g.   When we move to 802.11n
(probably in a year), the SDIO interface will be more of an issue.

Cheers,
wad
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Information on XO-1 power efficiency

2009-11-17 Thread david
On Tue, 17 Nov 2009, John Gilmore wrote:

 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?

 Bringing up the USB bus is apparently *designed* to take a large
 fraction of a second.  After you turn on USB bus power, you have to
 wait for X hundred milliseconds for the power to stabilize and for any
 devices to come out of power-on reset.  Ditto after you turn on USB
 signalling.

I seem to remember a discussion on linux-kernel about USB startup. 
historicly it waited 500ms (half a second) to allow devices to startup. 
there was apparently an attempt to shorten this to 100ms to speed up boot 
and people reported issues with devices not being detected. apparently 
it's highly dependant on the exact devices that you have, some are MUCH 
faster than others.

David Lang
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Information on XO-1 power efficiency

2009-11-12 Thread Christoph Derndorfer
Paul, Richard,

thanks a lot for your extensive replies, much appreciated! :-)

I probably won't be able to finish my slides before Sunday but I'll try and
send you a draft if I can find an Internet connection during my
Munich-Copenhagen-Stockholm train adventure...

Cheers,
Christoph

On Thu, Nov 12, 2009 at 7:22 AM, Richard A. Smith rich...@laptop.orgwrote:


  Now while the original goal of getting the XO-1's power consumption down
 to
  2W wasn't achieved it's still a pretty lean and efficient machine.

 In my power talks I give during country meetings I mention that if you see
 reference to a number for XO power usage that does not _specifically_
 indicate the usage during the measurement period then its wrong.

 There are several usage modes where the XO-1's power draw is  2W and even
 less than 1W.

 5 of the 7 modes I describe in the link below draw less than 2W.

 http://wiki.laptop.org/go/XO_power_draw#Modes

 What I suspect you mean here is the average power consumption for a average
 user with aggressive power saving mode disabled.  Which yes is above 2W.
  Its 4W-7W.

 If I seem a bit anal about that its intentional.  The reason is that in the
 past its not been clear that these power numbers discussed were for the low
 power modes and not the holistic average power draw.  I've had to deal with
 several deployments (small and larger) or test sites that have budgeted for
 2W (or some other odd number) of power and then get all cranky when I
 mention that charging the battery pulls 17W.

 Granted they should have checked but after its gone through 3 people
 speculation seems to turn into fact.

 So I try to very clear and specific when I talk about power usage to help
 try stop that from happening in the future.

  obviously plan to talk about the choice of hardware components and MLJ's
  display design. Another topic I'll touch upon is the wide-range voltage
  input which allows for a variety of power sources to be used without
  requiring further external regulation.

 18V max. [1]  Gen 1-5 opens that up to 24V.

 [1] Empirically you can get between 20-22V  but allowing for the tolerances
 of the parts the guaranteed minimum is 18V

  One thing I'm less sure about is the DCON because I'm don't know how
  aggressively it is currently being used (maybe someone can shine a light
 on
  this, I didn't find anything about it on the wiki or the mailing

 By DCON do you mean DCON mode or frozen.  Where the screen holds its last
 value the cpu gets turned off?  If so then its available in the latest XO-1
 build.  Right click on the center XO guy and select control panel then
 select power.  There is an option for enabling Automatic power management
 and its listed as experimental.  If you set that your system auto suspend
 when and activity timer expires.

 The knobs for the activity timer can be found in
 /etc/ohm/plugins.d/timeouts.ini  One of them controls when the backlight is
 dimmed the the other when suspend happens.  Units are ms.  If you set them
 really low you will roughly get the in between keystrokes behavior.
  Except that resume with WLAN takes around 900ms.  The drawbacks are that
 some of your networking apps won't work 100% like they did with the system
 up all the time and sometimes the WLAN device refuses to talk on the USB bus
 any more (USB 3 strikes error).

  list). Another question I'm interested in is what the efficiency of the
  AC-DC adapters shipped with the XO-1 is?

 The ultimate eff% depends on the line voltage, line frequency, load, and
 ambient temperature.  Its expressed as a series of curves.  See my statement
 above about referring to power with single-across-the-board numbers.  Unless
 you are in the lab you are guaranteed to be wrong.

 That said Energy Star attempts to reduce all that down to a class number by
 taking the average of 4 points spread on the curves. [2] Our class rating is
 IV which says that the adapter has an average efficiency of = 75%.

 [2] We are on an older energy star spec.  The latest energy star spec rev
 5.0 (Active July 1, 2009 ) has higher requirements.

  I'm also wondering whether it makes sense to talk about some of the ideas
  discussed in the early stages of the project (e.g. suspend inbetween
  key-strokes which IIRC ended up not being implemented).

 Certainly.  Please do.  These are very much still goals.  Right now the
 focus is on XO-1.5 where we hope to have bypassed some of the issues that
 gave us trouble in XO-1.  Then we can start work on making the networking
 apps and the timer subsystems play nice with turning off a CPU.  When thats
 all done then someone can look at if it makes sense to try and back port
 stuff to XO-1.

 Turning off CPU+Companion chip (or dropping it into non-functional but
 really low power mode) but still having a system that functions normally has
 the potential for large amounts of power savings.

 Consider my laptop where I run my IRC client. I leave it running so that
 people can ping me on 

Information on XO-1 power efficiency

2009-11-11 Thread Christoph Derndorfer
Hi all,

I've been invited to give a short talk on Energy consumption of Desktop and
Notebook Computers with a focus on the XO-1 design at a workshop in
Stockholm next week. The audience will mainly consist of scientists and
researchers working on IT topics within the context of energy consumption
and climate change.

Now while the original goal of getting the XO-1's power consumption down to
2W wasn't achieved it's still a pretty lean and efficient machine. I
obviously plan to talk about the choice of hardware components and MLJ's
display design. Another topic I'll touch upon is the wide-range voltage
input which allows for a variety of power sources to be used without
requiring further external regulation.

One thing I'm less sure about is the DCON because I'm don't know how
aggressively it is currently being used (maybe someone can shine a light on
this, I didn't find anything about it on the wiki or the mailing
list). Another question I'm interested in is what the efficiency of the
AC-DC adapters shipped with the XO-1 is?

I'm also wondering whether it makes sense to talk about some of the ideas
discussed in the early stages of the project (e.g. suspend inbetween
key-strokes which IIRC ended up not being implemented).

As I said it's only a short talk (10min max.) but there's anything else
significant when it comes to the power consumption and underlying design
that I've left out above then please give me a shout.

Thanks,
Christoph

-- 
Christoph Derndorfer
co-editor, olpcnews
url: www.olpcnews.com
e-mail: christ...@olpcnews.com
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Information on XO-1 power efficiency

2009-11-11 Thread Paul Fox
christoph wrote:
  Hi all,
  
  I've been invited to give a short talk on Energy consumption of Desktop and
  Notebook Computers with a focus on the XO-1 design at a workshop in
  Stockholm next week. The audience will mainly consist of scientists and
  researchers working on IT topics within the context of energy consumption
  and climate change.

i think cjb gave a similar talk last year -- he may have slides/info you
can use.

  
  Now while the original goal of getting the XO-1's power consumption down to
  2W wasn't achieved it's still a pretty lean and efficient machine. I
  obviously plan to talk about the choice of hardware components and MLJ's
  display design. Another topic I'll touch upon is the wide-range voltage
  input which allows for a variety of power sources to be used without
  requiring further external regulation.
  
  One thing I'm less sure about is the DCON because I'm don't know how
  aggressively it is currently being used (maybe someone can shine a light on
  this, I didn't find anything about it on the wiki or the mailing

if you enable automatic power management, then the dcon is used
to keep the display alive while the laptop goes to sleep after
just a 1 minute idle period.  that's the only current use of the
dcon for power savings that i'm aware of.

  list). Another question I'm interested in is what the efficiency of the
  AC-DC adapters shipped with the XO-1 is?
  
  I'm also wondering whether it makes sense to talk about some of the ideas
  discussed in the early stages of the project (e.g. suspend inbetween
  key-strokes which IIRC ended up not being implemented).

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.  but the system will wake fast enough to make going
to sleep during the reading phase of using an e-reader -- page
flips don't have to be super fast to be comfortable (witness the
amazon kindle).  we just never implemented such a mode in the
production software.  (i've used my XO as a book reader in the
past, using powerd to set very short (15 second) suspend timeouts
when the laptop is configured in ebook format.)

paul

  
  As I said it's only a short talk (10min max.) but there's anything else
  significant when it comes to the power consumption and underlying design
  that I've left out above then please give me a shout.
  
  Thanks,
  Christoph
  

=-
 paul fox, p...@laptop.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Information on XO-1 power efficiency

2009-11-11 Thread Paul Fox
hal wrote:
  
  p...@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@lists.laptop.org
  http://lists.laptop.org/listinfo/devel

=-
 paul fox, p...@laptop.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel