[ltp] 2.6.24, lack of CPU affinity on dual core duo causing many interrupts and high power consumption? CFS a problem?

Marc MERLIN linux-thinkpad@linux-thinkpad.org
Thu, 31 Jan 2008 23:40:02 +1100


I'm still working on my problems of high power draw on now 2.6.24.
(thinkpad Z61p dual core duo)

When I try to quiet everything down, I get this:
> Wakeups-from-idle per second : 1210.7   interval: 10.0s
> Power usage (ACPI estimate): 20.5W (3.2 hours)
> 
> Top causes for wakeups:
>   40.0% (507.1)      <kernel IPI> : Rescheduling interrupts 
>   17.2% (218.3)       firefox-bin : futex_wait (hrtimer_wakeup) 
>   15.6% (197.7)       <interrupt> : extra timer interrupt 
>   13.9% (176.2)       firefox-bin : schedule_timeout (process_timeout) 
>    6.1% ( 77.1)       <interrupt> : PS/2 keyboard/mouse/touchpad 
>    1.8% ( 23.3)              Xorg : do_setitimer (it_real_fn) 
>    1.3% ( 16.8)       <interrupt> : acpi 
>    0.9% ( 10.8)       <interrupt> : uhci_hcd:usb2, ohci1394, HDA Intel

or if I stop firefox:
> Wakeups-from-idle per second : 211.0    interval: 10.0s
> Power usage (ACPI estimate): 19.7W (3.3 hours)
> 
> Top causes for wakeups:
>   39.7% ( 63.6)      <kernel IPI> : Rescheduling interrupts 
>   19.6% ( 31.4)     enlightenment : schedule_timeout (process_timeout) 
>    7.5% ( 12.0)       <interrupt> : acpi 
>    6.7% ( 10.7)       <interrupt> : uhci_hcd:usb2, ohci1394, HDA Intel 
>    6.0% (  9.6)       <interrupt> : extra timer interrupt
>    4.0% (  6.4)             artsd : schedule_timeout (process_timeout)

It looks like in both cases, firefox or enlightenment are bouncing back
and forth between my two CPUs, which might be why sometimes I get a
really low 16W power consumption (when the stars align), but otherwise,
I'm closer to 20W or more.

The <kernel IPI> line is new with 2.6.24, and the scheduler that I
switched to CFS.

Should I try other schedulers?
Is there a way to tell the scheduler to just stop using CPU #2 without
shutting the CPU down in a non C3 state?

Or how can I bind enlightenment and firefox to a specific CPU?

If that helps, a typical usage on batteries with wireless looks like
this right now:
     PowerTOP version 1.9       (C) 2007 Intel Corporation

Cn                Avg residency       P-states (frequencies)
C0 (cpu running)        (20.9%)         2.00 Ghz     2.4%
C1                0.0ms ( 0.0%)         1.67 Ghz     0.0%
C2                0.7ms (52.6%)         1333 Mhz     0.0%
C3                0.5ms (26.4%)         1000 Mhz    97.6%


Wakeups-from-idle per second : 1239.0   interval: 2.0s
Power usage (ACPI estimate): 24.7W (2.9 hours)

Top causes for wakeups:
  37.8% (514.0)      <kernel IPI> : Rescheduling interrupts 
  19.4% (264.0)       <interrupt> : uhci_hcd:usb2, ohci1394, HDA Intel, iwl3945 
-> this is due to wireless being in use.
  14.2% (193.0)       firefox-bin : futex_wait (hrtimer_wakeup) 
  12.7% (173.0)       firefox-bin : schedule_timeout (process_timeout) 
  10.2% (139.5)       <interrupt> : extra timer interrupt 
   1.5% ( 21.0)              Xorg : do_setitimer (it_real_fn) 
   0.9% ( 12.0)     <kernel core> : rs_tx_status (iwl_bg_rate_scale_flush) 
   0.5% (  7.0)             artsd : schedule_timeout (process_timeout)
   0.4% (  5.0)               tpb : do_nanosleep (hrtimer_wakeup)
   0.3% (  4.0)   <kernel module> : usb_hcd_poll_rh_status (rh_timer_func)
   0.3% (  3.5)     enlightenment : schedule_timeout (process_timeout)
   0.2% (  2.5)       firefox-bin : sk_reset_timer (tcp_delack_timer)
   0.1% (  2.0)         Eterm.bin : schedule_timeout (process_timeout)
   0.1% (  2.0)   <kernel module> : neigh_table_init_no_netlink (neigh_periodic_ti
   0.1% (  1.5)            pidgin : schedule_timeout (process_timeout)
   0.1% (  1.5)     <kernel core> : sk_reset_timer (tcp_delack_timer)
   0.1% (  1.0)       <interrupt> : PS/2 keyboard/mouse/touchpad
   0.1% (  1.0)        atieventsd : schedule_timeout (process_timeout)

As you can see, nothing great. It's actually worse than with 2.6.22 I'm
pretty sure, probably because of the CFS scheduler and that  <kernel IPI>

Thanks for any suggestions,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/