If you missed the webinar this week you can view the slides here or the recorded version here.
These are the questions provided by the audience that I thought I could handle. Kaitlin Murphy from Intel is working on hers and we should get them together here shortly.
Q: Hi, you discussed the cpu-freq and dynamic frequency and power scaling? What about the control of idle sleep modes?
The questioner went on to correctly identified the cpu-idle subsystem as being responsible for putting the processor into various sleep states (C-states).
Q: How do make the application itself “power aware”?
As discussed in the call there are a few techniques that can be considered:
- The application could itself serve as a userspace governor for voltage and frequency scaling.
- The application can use the provided /proc and /sys interfaces to monitor the power status of the system including the AC & battery states, the frequency and voltage scaling behavior of the system. Very intelligent applications might use this data to defer power hungry tasks until later or even limit certain usage modes.
- One should take care with all applications to ensure that they are not unnecessarily keeping power hungry devices open (which would prevent them from being powered down) or causing wakeups that are not needed. Dave Jones (RH) made a presentation at the Ottawa Linux Symposium 2006 about unneeded wakeups and other topics titled “Why Userspace Sucks” that is worth reading.
Q: Has this power management work been accepted by the open source community and the community will maintain it with kernel evolving?
All of the features I discussed are evolving in a public multi-party fashion in the mainline kernel tree and other contributing subsystem trees. Many companies play a role as do unaffiliated individuals. Notable contributors include Len Brown (Intel, ACPI), Ingo Molnar (RH, RT and everything) and Thomas Gleixner (Linutronix, dynticks, clockevents, etc.), Venki Pallipadi (Intel, deferrable timers). I know there are others but I’m getting tired of Googling. No offense intended at all.
What we’ve discovered over the years is that having the supporting technologies is important but then actually tuning them to work on a specific hardware, kernel, userspace, and application workload is essential.
You can’t download a kernel.org tree and expect power nirvana… but power management in the community has evolved and advanced significantly thanks to contributions from many.
Q: I guess CPUFreq driver should interact with clock framework. When and how they interact with each other?
Yes… you certainly want your timers to go off at the right time and your clocks to advance at the proper rate.
Quick grep study shows that the cpufreq_register_notifier() function is used in most architecture specific timekeeping code in order to register a notifier that updates the loops_per_jiffy. This is reinforced by the file Documentation/cpufreq/core.txt from the kernel source:
The CPUFreq core code is located in drivers/cpufreq/cpufreq.c. This
cpufreq code offers a standardized interface for the CPUFreq
architecture drivers (those pieces of code that do actual
frequency transitions), as well as to “notifiers”. These are device
drivers or other part of the kernel that need to be informed of
policy changes (ex. thermal modules like ACPI) or of all
frequency changes (ex. timing code) or even need to force certain
speed limits (like LCD drivers on ARM architecture). Additionally, the
kernel “constant” loops_per_jiffy is updated on frequency changes
here.
Q: on this slide you have APCI..is that a typo or a new Acronym?
Typo.
Q: What is the maximum amount of time a deferred timer may be deferred?
A: There is no maximal value defined or allowed to be defined. The timer will defer until a non-deferrable event such as another timer awakes the system. For more information this LWN.net article may be useful.
Q: Would the Atom processor be useful to run a real-time OS like MontaVista, and could sleeping between tasks be implemented in the real-time OS?
The question is a wonderful reminder that not all real time tasks are “fast”. There are a great number of RT applications which don’t require non-stop and rapid response to events. Some of these “slow” RT applications could benefit from utilizing power management capabilities in-between events.
Yes, the operating system could put the system to sleep in between events, even RT events. The responsiveness of the platform to the next RT event will be influenced by the speed that the platform can emerge from the sleep state. For example: If the hardware platform can emerge from sleep within 50ms (a totally made up number) and your event only has to be responded to within 100ms you might be fine. If your even requires a 1ms response time then you may have a problem.
Very deep sleep states (like the C6 state mention by Kaitlin on the Intel Atom processor) that flush caches may introduce secondary performance impacts. The caches will have to be refilled from main memory and this would introduce additional overhead as the system emerges from sleep.
If the performance penalty of emerging from sleep is unacceptable you could utilize the other power saving features (frequency and voltage scaling, I/O device shut-down, etc.) and avoid using sleep states.
Q: Could you recommend a development system to play with MontaVista and the Intel Atom processor?
As mentioned earlier we support the Intel® Atom™ Z500 Processor Board with our Professional Edition 5.0 product. You can find our full list of supported hardware here.
I forgot to include some image credits in my presentation. Here they are:
Public Domain
http://en.wikipedia.org/wiki/Image:9700_HMS.PNG
CC Attribution 3.0 Unported
http://staticfree.info/projects/24h_clock/
CC Attribution-Share Alike 2.0 Generic
http://flickr.com/photos/jojakeman/2433418929/
http://flickr.com/photos/nirmalthacker/2187149611/
http://flickr.com/photos/yahtzeen/37102029/
ShareThis