[ltp] CPU running ??? but why????

Peter F. Patel-Schneider linux-thinkpad@linux-thinkpad.org
Sun, 08 Jun 2008 13:49:47 -0400 (EDT)


As my machine just exhibited the problem, I decided to try the
experiment of removing modules.   In summary, none of this helped.
(When I rebooted the machine, the wakeups went away, which is also quite
common.)


The machine is a Thinkpad T60p with a 3945 wireless and ATI graphics.
It has no firewire hardware. 

The machine was having between 20K and 55K wakeups per second.  The
total of the wakeups from powertop was only about 40 (when the mouse was
inactive).

I tried various things, listed below. None of them made any appreciable
change. 

Turn off networking     
modprobe -r iwl3945     
Radio kill switch on    
modprobe -r bnep        
modprobe -r rfcomm      
modprobe -r l2cap       
modprobe -r bluetooth   
modprobe -r mac80211    
modprobe -r cfg80211    
modprobe -r snd_seq_oss 
modprobe -r snd_seq_dummy       
modprobe -r snd_seq_midi_event  
modprobe -r snd_seq             
modprobe -r snd_seq_device      
modprobe -r snd_pcm_oss         
modprobe -r snd_mixer_oss       
modprobe -r uhci_hcd            
modprobe -r ohci_hcd            
modprobe -r ehci_hcd            
modprobe -r e1000e              
modprobe -r sr_mod              
modprobe -r pata_acpi           
modprobe -r iTCO_wdt            
modprobe -r iTCO_vendor_support 
modprobe -r i2c_i801            
modprobe -r ata_generic         
modprobe -r joydev              
modprobe -r dm_multipath        
modprobe -r dm_zero             
modprobe -r dm_mirror           
modprobe -r dm_mod              
modprobe -r sg                  
modprobe -r ata_piix            
modprobe -r sr_mod              
modprobe -r cdrom               
modprobe -r cpufreq_stats       
modprobe -r bridge              
modprobe -r loop
modprobe -r nsc_ircc
modprobe -r arc4
modprobe -r ecb
modprobe -r ac
modprobe -r battery
modprobe -r video
modprobe -r output
modprobe -r bay
modprobe -r button
modprobe -r ata_piix
modprobe -r pcspkr
modprobe -r sg

After removing modules the following remained:

[root@idefix ibm]# lsmod
Module                  Size  Used by
autofs4                20356  2 
fuse                   41116  3 
sunrpc                151412  3 
ipt_REJECT              6784  2 
nf_conntrack_ipv4      11396  2 
iptable_filter          6528  1 
ip_tables              13840  1 iptable_filter
ip6t_REJECT             7552  2 
xt_tcpudp               6656  2 
nf_conntrack_ipv6      15864  2 
xt_state                5888  4 
nf_conntrack           49748  3 nf_conntrack_ipv4,nf_conntrack_ipv6,xt_state
ip6table_filter         6400  1 
ip6_tables             14736  1 ip6table_filter
x_tables               15236  6 ipt_REJECT,ip_tables,ip6t_REJECT,xt_tcpudp,xt_state,ip6_tables
cpufreq_ondemand       10124  1 
acpi_cpufreq           11532  2 
radeon                116996  2 
drm                   145508  3 radeon
ipv6                  221660  16 ip6t_REJECT,nf_conntrack_ipv6
snd_hda_intel         336928  1 
thinkpad_acpi          50456  1 
hwmon                   6300  1 thinkpad_acpi
snd_pcm                67076  1 snd_hda_intel
snd_timer              21640  1 snd_pcm
snd_page_alloc         11400  2 snd_hda_intel,snd_pcm
snd_hwdep              10500  1 snd_hda_intel
snd                    48312  6 snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
soundcore               9288  1 snd
i2c_core               20628  1 drm
dm_mod                 49236  5 
ahci                   26760  2 
libata                126816  1 ahci
sd_mod                 25624  3 
scsi_mod              121204  2 libata,sd_mod
ext3                  109064  2 
jbd                    40980  1 ext3
mbcache                10116  1 ext3

The PCI bus has the following devices:

[root@idefix ibm]# lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc M56GL [Mobility FireGL V5200]
02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller


After the above actions powertop still shows lots of wakeups, but top
shows very little activity.

[root@idefix ibm]# powertop --dump
PowerTOP 1.9    (C) 2007 Intel Corporation 

Collecting data for 15 seconds 
Cn                Avg residency
C0 (cpu running)        (36.1%)
C1                0.0ms ( 0.0%)
C2                0.0ms (62.5%)
C3                0.0ms ( 1.4%)
P-states (frequencies)
  2.17 Ghz    10.9%
  1.67 Ghz     0.0%
  1333 Mhz     0.0%
  1000 Mhz    89.1%
Wakeups-from-idle per second : 46910.8  interval: 15.0s
Top causes for wakeups:
  77.1% ( 17.5)       <interrupt> : extra timer interrupt 
  19.4% (  4.4)      <kernel IPI> : Rescheduling interrupts 
   0.6% (  0.1)   setroubleshootd : schedule_timeout (process_timeout) 
   0.6% (  0.1)         automount : futex_wait (hrtimer_wakeup) 
   0.6% (  0.1)    im-info-daemon : do_nanosleep (hrtimer_wakeup) 
   0.3% (  0.1)       <interrupt> : PS/2 keyboard/mouse/touchpad 
   0.3% (  0.1)   pam_timestamp_c : schedule_timeout (process_timeout) 
   0.3% (  0.1)   <kernel module> : neigh_table_init_no_netlink (neigh_periodic_timer) 
   0.3% (  0.1)     <kernel core> : neigh_table_init_no_netlink (neigh_periodic_timer) 
   0.3% (  0.1)      clock-applet : schedule_timeout (process_timeout) 
   0.3% (  0.1)       gnome-panel : schedule_timeout (process_timeout) 

[root@idefix ibm]# top
top - 13:27:10 up  2:06,  2 users,  load average: 0.01, 0.03, 0.00
Tasks: 127 total,   3 running, 124 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.1%us,  0.7%sy,  0.0%ni, 93.1%id,  1.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2074012k total,   598384k used,  1475628k free,    23100k buffers
Swap:  2031608k total,        0k used,  2031608k free,   364888k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND             
 2437 root      20   0  314m  34m  11m S  2.0  1.7   3:15.88 Xorg                
 6533 pfps      20   0 85692  20m  11m S  2.0  1.0   0:01.52 gnome-terminal      
 6568 root      20   0  5140 1776  832 S  2.0  0.1   0:02.61 powertop            
13949 root      20   0  2360  920  700 R  2.0  0.0   0:00.01 top                 
    1 root      20   0  1948  736  532 S  0.0  0.0   0:01.33 init                
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd            
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.29 migration/0         
    4 root      15  -5     0    0    0 S  0.0  0.0   0:00.16 ksoftirqd/0         
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0          
    6 root      RT  -5     0    0    0 S  0.0  0.0   0:00.24 migration/1         
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.12 ksoftirqd/1         
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1          
    9 root      15  -5     0    0    0 R  0.0  0.0   0:01.09 events/0            
   10 root      15  -5     0    0    0 S  0.0  0.0   0:00.04 events/1            
   11 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper             
   65 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kblockd/0           
   66 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kblockd/1


peter




From: Florian Reitmeir <florian@reitmeir.org>
Subject: Re: [ltp] CPU running ??? but why????
Date: Sun, 8 Jun 2008 17:26:04 +0200

> On Sun, 08 Jun 2008, Arno Trautmann wrote:
> 
> > Florian Reitmeir wrote:
> >> On Sat, 07 Jun 2008, Peter F. Patel-Schneider wrote:
> >>
> >>> As far as I know, this is an unexplained phenomenon that has been around
> >>> for at least a year now.  My Lenovo T60p exhibits this behaviour
> >>> sometimes, but not all the time.  Even more strangely, the aberrant
> >>> behaviour comes and goes - for a few days it happens quite reqularly,
> >>> then there is no problem for weeks on end.
> >>>
> >>> Several people, myself included, have asked in various fora about the
> >>> problem, including the powertop mailing list, accessible at
> >>>   http://www.bughost.org/mailman/listinfo/power
> >>> see   http://www.bughost.org/pipermail/power/2007-May/000337.html  
> >>> for the first report that I can find.  I just noticed a recent report 
> >>> on
> >>> the problem
> >>>   http://www.bughost.org/pipermail/power/2008-June/001371.html
> >>>
> >>> So what is causing the problem?  The guessing, and as far as I know it
> >>> is only guessing, is that some DMA activity is causing the wakeups, but
> >>> I don't even know enough about the situation to figure out whether
> >>> explanation makes any sense.  Even if this is the case, I haven't seen
> >>> any hints on how to attempt to fix the problem, or even which of the
> >>> many devices built in to my T60p is the source.  I don't even know how
> >>> widespread the problem is.
> >>>
> >>> All in all, quite frustrating.
> >>
> >> just run powetop in one terminal
> >> and run an other terminal in which you remove kernel modules, one by one.
> >>
> >> typical these kernel modules first:
> >> 	- usb
> >> 	- firewire
> >> 	- sound hardware
> >> 	- yenta socket
> >>
> >> take your time, if its a hardware problem you should be able to debug it, in
> >> about 30 mins.
> >
> > That sounds good? but I don?t have any idea how to do this? I?m quite  
> > new to linux, so could you give me some concrete commandos or a page  
> > where I can find some examples? I would be very happy if I could track  
> > it down on this way!
> ok
> 
> open 2 terminals ... just gome-terminals oder xterms or ..
> make sure you have root permissions, so do a 'su -' and enter the root
> password.
> 
> 
> now you can start powertop in one terminal
> 
> to list the loaded modules (=drivers) type 'lsmod'
> to unload a module type 'modprobe -r <module name>'
> to load a module type 'modprobe <module name>'
> 
> Note: some modules depend on others.. so lsmod gives you on the left side a
> column of module names, on the right side which other module needs the
> current module.
> 
> And normally you can't crash your Laptop, because the kernel denies access to
> modules which are in use, _but_ do not rely on that.
> 
> 
> then.. just unload modules, and look at powertop.
> 
> 
> -- 
> Florian Reitmeir
> -- 
> The linux-thinkpad mailing list home page is at:
> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad