* [announce] Intel announces the PowerTOP utility for Linux
@ 2007-05-11 23:07 Arjan van de Ven
2007-05-12 0:17 ` Matt Mackall
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Arjan van de Ven @ 2007-05-11 23:07 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: linux-acpi
What's eating the battery life of my laptop? Why isn't it many more
hours? Which software component causes the most power to be burned?
These are important questions without a good answer... until now.
The Linux 2.6.21 kernel introduces the so called tickless-idle
feature. This feature allows the processor to be really idle for long
periods of time, rather than having to wake up every millisecond for
the timer tick. Current processors save a lot of power if they are
idle for long periods, which translates into a longer battery life for
your laptop, or a lower energy bill for your datacenter. However, a
Linux system consists of more software than just the kernel, and there
are many tunables involved. It's not easy to see what is going on, and
as a result the behavior is sometimes far from optimal, and a lot of
power is wasted.
Intel is proud to announce the PowerTOP tool
(http://www.linuxpowertop.org), a program that collects the various
pieces of information from your system and presents an overview of how
well your laptop is doing in terms of power savings. In addition,
PowerTOP will provide an indication of which tunables and software
components are the biggest offenders in slurping up your battery time.
PowerTOP will update it's display frequently so that you can directly
see the impact of any changes you are making.
A typical Linux distribution has many components that wake the
processor up frequently for no good reason. In our testing with
PowerTOP, we have seen many cases where with some simple fixes, the
battery life of typical laptops was increased by one hour or more!
We are providing fixes for several of the issues we identified, and we
encourage the Linux community to help us in this quest to get the
maximum battery life out of your (hopefully Intel based) laptops. Try
the PowerTOP tool, join the mailing list or the IRC channel and
provide feedback, problem reports or fixes!
Website: http://www.linuxpowertop.org
IRC: irc.oftc.net #powertop channel
Mailing list: http://www.bughost.org/mailman/listinfo/power
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-11 23:07 Arjan van de Ven
@ 2007-05-12 0:17 ` Matt Mackall
2007-05-12 11:00 ` Jan Engelhardt
2007-05-12 21:12 ` Alistair John Strachan
2 siblings, 0 replies; 11+ messages in thread
From: Matt Mackall @ 2007-05-12 0:17 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Linux Kernel Mailing List, linux-acpi
On Fri, May 11, 2007 at 04:07:18PM -0700, Arjan van de Ven wrote:
>
> What's eating the battery life of my laptop? Why isn't it many more
> hours? Which software component causes the most power to be burned?
> These are important questions without a good answer... until now.
I get:
No detailed statistics available; please enable the CONFIG_TIMER_STATS
kernel option
with:
$ zgrep STATS /proc/config.gz
# CONFIG_TASKSTATS is not set
# CONFIG_SCHEDSTATS is not set
CONFIG_TIMER_STATS=y
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-11 23:07 Arjan van de Ven
2007-05-12 0:17 ` Matt Mackall
@ 2007-05-12 11:00 ` Jan Engelhardt
2007-05-12 17:44 ` Arjan van de Ven
2007-05-12 21:12 ` Alistair John Strachan
2 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2007-05-12 11:00 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Linux Kernel Mailing List, linux-acpi
On May 11 2007 16:07, Arjan van de Ven wrote:
>
> A typical Linux distribution has many components that wake the processor up
> frequently for no good reason. In our testing with PowerTOP, we have seen many
> cases where with some simple fixes, the battery life of typical laptops was
> increased by one hour or more!
>
> We are providing fixes for several of the issues we identified, and we
> encourage the Linux community to help us in this quest to get the maximum
> battery life out of your (hopefully Intel based) laptops. Try the PowerTOP
> tool, join the mailing list or the IRC channel and provide feedback, problem
> reports or fixes!
Yeah, hal happily wakes up every two seconds. So much for
the effectivity of NO_HZ.
# ps afx | grep hal
...
3003 ? S 0:00 \_ hald-addon-storage: polling /dev/hdb
...
# strace -p 3003
Process 3003 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
open("/dev/hdb", O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE) = 4
ioctl(4, CDROM_DRIVE_STATUS, 0x7fffffff) = 1
close(4) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({2, 0}, {2, 0}) = 0
open("/dev/hdb", O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE) = 4
ioctl(4, CDROM_DRIVE_STATUS, 0x7fffffff) = 1
close(4) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({2, 0}, {2, 0}) = 0
open("/dev/hdb", O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE) = 4
ioctl(4, CDROM_DRIVE_STATUS, 0x7fffffff) = 1
close(4) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({2, 0}, <unfinished ...>
Jan
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-12 11:00 ` Jan Engelhardt
@ 2007-05-12 17:44 ` Arjan van de Ven
0 siblings, 0 replies; 11+ messages in thread
From: Arjan van de Ven @ 2007-05-12 17:44 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Linux Kernel Mailing List, linux-acpi
On Sat, 2007-05-12 at 13:00 +0200, Jan Engelhardt wrote:
> On May 11 2007 16:07, Arjan van de Ven wrote:
> >
> > A typical Linux distribution has many components that wake the processor up
> > frequently for no good reason. In our testing with PowerTOP, we have seen many
> > cases where with some simple fixes, the battery life of typical laptops was
> > increased by one hour or more!
> >
> > We are providing fixes for several of the issues we identified, and we
> > encourage the Linux community to help us in this quest to get the maximum
> > battery life out of your (hopefully Intel based) laptops. Try the PowerTOP
> > tool, join the mailing list or the IRC channel and provide feedback, problem
> > reports or fixes!
>
> Yeah, hal happily wakes up every two seconds. So much for
> the effectivity of NO_HZ.
The AN patches that Kristen posted a few days ago will fix this part of
hal for real... assuming you have hardware with AN support that is.
they are in -mm now... should go mainline in like 2.6.23
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-11 23:07 Arjan van de Ven
2007-05-12 0:17 ` Matt Mackall
2007-05-12 11:00 ` Jan Engelhardt
@ 2007-05-12 21:12 ` Alistair John Strachan
2007-05-14 20:22 ` Jan Engelhardt
2 siblings, 1 reply; 11+ messages in thread
From: Alistair John Strachan @ 2007-05-12 21:12 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Linux Kernel Mailing List, linux-acpi
On Saturday 12 May 2007 00:07:18 Arjan van de Ven wrote:
> What's eating the battery life of my laptop? Why isn't it many more
> hours? Which software component causes the most power to be burned?
> These are important questions without a good answer... until now.
This is a really great tool and presents a very intuitive alternative to the
timer stats file..
On a Core 2 Duo Macbook, Linux always gets around 3.2h battery, OS X about
4.2h. This tool has identified that uhci_hcd is where 75% of the ticks are
going when X is not loaded. Unloading uhci_hcd drops the battery life back to
around 4.2h, but I lose the keyboard.
Is there any way to find out what USB driver is causing usb_uhci to be this
busy?
(BTW, the link to Keith's patch for dhcdbd seems to be broken on your
homepage.)
--
Cheers,
Alistair.
Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-12 21:12 ` Alistair John Strachan
@ 2007-05-14 20:22 ` Jan Engelhardt
2007-05-14 20:42 ` Alistair John Strachan
0 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2007-05-14 20:22 UTC (permalink / raw)
To: Alistair John Strachan
Cc: Arjan van de Ven, Linux Kernel Mailing List, linux-acpi
On May 12 2007 22:12, Alistair John Strachan wrote:
>On Saturday 12 May 2007 00:07:18 Arjan van de Ven wrote:
>> What's eating the battery life of my laptop? Why isn't it many more
>> hours? Which software component causes the most power to be burned?
>> These are important questions without a good answer... until now.
>
>This is a really great tool and presents a very intuitive alternative to the
>timer stats file..
>
>On a Core 2 Duo Macbook, Linux always gets around 3.2h battery, OS X about
>4.2h. This tool has identified that uhci_hcd is where 75% of the ticks are
>going when X is not loaded. Unloading uhci_hcd drops the battery life back to
>around 4.2h, but I lose the keyboard.
>
>Is there any way to find out what USB driver is causing usb_uhci to be this
>busy?
At its worst, it _is_ the USB chip that draws the power when it is active
(when uhci_hcd is loaded); does not need to be usbhid or so.
Jan
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-14 20:22 ` Jan Engelhardt
@ 2007-05-14 20:42 ` Alistair John Strachan
0 siblings, 0 replies; 11+ messages in thread
From: Alistair John Strachan @ 2007-05-14 20:42 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Arjan van de Ven, Linux Kernel Mailing List, linux-acpi
On Monday 14 May 2007 21:22:50 Jan Engelhardt wrote:
> On May 12 2007 22:12, Alistair John Strachan wrote:
> >On Saturday 12 May 2007 00:07:18 Arjan van de Ven wrote:
> >> What's eating the battery life of my laptop? Why isn't it many more
> >> hours? Which software component causes the most power to be burned?
> >> These are important questions without a good answer... until now.
> >
> >This is a really great tool and presents a very intuitive alternative to
> > the timer stats file..
> >
> >On a Core 2 Duo Macbook, Linux always gets around 3.2h battery, OS X about
> >4.2h. This tool has identified that uhci_hcd is where 75% of the ticks are
> >going when X is not loaded. Unloading uhci_hcd drops the battery life back
> > to around 4.2h, but I lose the keyboard.
> >
> >Is there any way to find out what USB driver is causing usb_uhci to be
> > this busy?
>
> At its worst, it _is_ the USB chip that draws the power when it is active
> (when uhci_hcd is loaded); does not need to be usbhid or so.
This is certainly true, and to a significant extent it _was_ the uhci_hcd, but
it turns out the main contributor to HZ here were the appletouch and hci_usb
drivers. Disabling both drops the ticks down from about 850 to 150.
--
Cheers,
Alistair.
Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
[not found] <fa.FTEkheuP0nHOUv0cCp0k8pBuoMU@ifi.uio.no>
@ 2007-05-15 0:13 ` Robert Hancock
2007-05-15 16:30 ` Ondrej Zary
0 siblings, 1 reply; 11+ messages in thread
From: Robert Hancock @ 2007-05-15 0:13 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Linux Kernel Mailing List
Looks like the radeon driver has the same problem as the i915 driver
mentioned on the known problems page - I get 60 wakeups/sec from it on
my Compaq X1000 laptop (Radeon 9000 graphics) while in X, which
essentially prevents entry into C3.
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-15 0:13 ` [announce] Intel announces the PowerTOP utility for Linux Robert Hancock
@ 2007-05-15 16:30 ` Ondrej Zary
2007-05-16 7:52 ` Schmidt Michal
0 siblings, 1 reply; 11+ messages in thread
From: Ondrej Zary @ 2007-05-15 16:30 UTC (permalink / raw)
To: Robert Hancock; +Cc: Arjan van de Ven, Linux Kernel Mailing List
On Tuesday 15 May 2007 02:13:15 Robert Hancock wrote:
> Looks like the radeon driver has the same problem as the i915 driver
> mentioned on the known problems page - I get 60 wakeups/sec from it on
> my Compaq X1000 laptop (Radeon 9000 graphics) while in X, which
> essentially prevents entry into C3.
And Rage 128 too.
--
Ondrej Zary
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-15 16:30 ` Ondrej Zary
@ 2007-05-16 7:52 ` Schmidt Michal
2007-05-16 14:20 ` Pavel Machek
0 siblings, 1 reply; 11+ messages in thread
From: Schmidt Michal @ 2007-05-16 7:52 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Robert Hancock, Arjan van de Ven, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
Ondrej Zary wrote:
> On Tuesday 15 May 2007 02:13:15 Robert Hancock wrote:
>> Looks like the radeon driver has the same problem as the i915 driver
>> mentioned on the known problems page - I get 60 wakeups/sec from it on
>> my Compaq X1000 laptop (Radeon 9000 graphics) while in X, which
>> essentially prevents entry into C3.
>
> And Rage 128 too.
>
I have a Radeon 7500 in my laptop. The attached hack to disable the
VBLANK interrupt works for me. I don't know if it breaks 3D, I've only
tried 2D.
Michal
[-- Attachment #2: radeon-no-vblank-int.diff --]
[-- Type: text/plain, Size: 615 bytes --]
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
index 3ff0baa..a990bb6 100644
--- a/drivers/char/drm/radeon_irq.c
+++ b/drivers/char/drm/radeon_irq.c
@@ -227,9 +227,8 @@ void radeon_driver_irq_postinstall(drm_device_t * dev)
atomic_set(&dev_priv->swi_emitted, 0);
DRM_INIT_WAITQUEUE(&dev_priv->swi_queue);
- /* Turn on SW and VBL ints */
- RADEON_WRITE(RADEON_GEN_INT_CNTL,
- RADEON_CRTC_VBLANK_MASK | RADEON_SW_INT_ENABLE);
+ /* Turn on the SW interrupt */
+ RADEON_WRITE(RADEON_GEN_INT_CNTL, RADEON_SW_INT_ENABLE);
}
void radeon_driver_irq_uninstall(drm_device_t * dev)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [announce] Intel announces the PowerTOP utility for Linux
2007-05-16 7:52 ` Schmidt Michal
@ 2007-05-16 14:20 ` Pavel Machek
0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2007-05-16 14:20 UTC (permalink / raw)
To: Schmidt Michal
Cc: Ondrej Zary, Robert Hancock, Arjan van de Ven,
Linux Kernel Mailing List
Hi!
> >On Tuesday 15 May 2007 02:13:15 Robert Hancock wrote:
> >>Looks like the radeon driver has the same problem as
> >>the i915 driver
> >>mentioned on the known problems page - I get 60
> >>wakeups/sec from it on
> >>my Compaq X1000 laptop (Radeon 9000 graphics) while in
> >>X, which
> >>essentially prevents entry into C3.
> >
> >And Rage 128 too.
> >
>
> I have a Radeon 7500 in my laptop. The attached hack to
> disable the VBLANK interrupt works for me. I don't know
> if it breaks 3D, I've only tried 2D.
Hmm, you should probably find where it is used, and only enable irq
when neccessary. Disabling it always will break something.
> diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
> index 3ff0baa..a990bb6 100644
> --- a/drivers/char/drm/radeon_irq.c
> +++ b/drivers/char/drm/radeon_irq.c
> @@ -227,9 +227,8 @@ void radeon_driver_irq_postinstall(drm_device_t * dev)
> atomic_set(&dev_priv->swi_emitted, 0);
> DRM_INIT_WAITQUEUE(&dev_priv->swi_queue);
>
> - /* Turn on SW and VBL ints */
> - RADEON_WRITE(RADEON_GEN_INT_CNTL,
> - RADEON_CRTC_VBLANK_MASK | RADEON_SW_INT_ENABLE);
> + /* Turn on the SW interrupt */
> + RADEON_WRITE(RADEON_GEN_INT_CNTL, RADEON_SW_INT_ENABLE);
> }
>
> void radeon_driver_irq_uninstall(drm_device_t * dev)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-05-16 19:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fa.FTEkheuP0nHOUv0cCp0k8pBuoMU@ifi.uio.no>
2007-05-15 0:13 ` [announce] Intel announces the PowerTOP utility for Linux Robert Hancock
2007-05-15 16:30 ` Ondrej Zary
2007-05-16 7:52 ` Schmidt Michal
2007-05-16 14:20 ` Pavel Machek
2007-05-11 23:07 Arjan van de Ven
2007-05-12 0:17 ` Matt Mackall
2007-05-12 11:00 ` Jan Engelhardt
2007-05-12 17:44 ` Arjan van de Ven
2007-05-12 21:12 ` Alistair John Strachan
2007-05-14 20:22 ` Jan Engelhardt
2007-05-14 20:42 ` Alistair John Strachan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox