High number of USB interrupts/s on an idle system

martin sperl kernel at martin.sperl.org
Fri Nov 29 03:40:52 PST 2013


Hi!

I have done the setup of the RPI using Stephens "vanilla" tree (commit:
d5d9894) and the steps from his blog with regards to uboot, the usb
power-on hack in uboot, ...

The thing is that I see high interrupt rates on the board even when the
system is totally idle.

Here some statistics via vmstat:
root at modelb:~# vmstat 1
procs -----------memory---------- --wap-- -io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si so  bi  bo   in   cs us sy id wa
 0  0      0  12840  20880 350712    0  0   9  56  847   85 59  4 20 17
 0  0      0  12840  20880 350712    0  0   0   0 8057   14  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8034    9  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8033   11  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8032   11  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8036   13  0  1 99  0
 0  0      0  12840  20880 350712    0  0   0   0 8035    9  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8034   11  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8035   13  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8033   13  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8033   11  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8033    9  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8034   11  0  1 99  0
 0  0      0  12840  20880 350712    0  0   0   0 8033   11  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8033    9  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8035   13  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8031   13  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8034    9  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8035   11  0  0 100  0
 0  0      0  12840  20880 350712    0  0   0   0 8036    9  0  1 99  0
 0  0      0  12840  20880 350712    0  0   0   0 8034   13  0  0 100  0

Now looking at the interrupts over a 100s interval I see with the
following script:
( cat /proc/interrupts ;  sleep 100;cat /proc/interrupts) \
| awk '{C[$1]=$2-C[$1];D[$1]=$5;}
  END{for(i in C){printf "%-6s %6i %s\n",i,C [i]/100,D[i];}}' \

output is (sorted manually filtered some lines):
Num     IRQ/s description
27:        12 timer
33:      8001 20980000.usb,
73:         0 20200000.gpio:bank0
74:         0 20200000.gpio:bank1
77:         0 20205000.i2c,
78:         0 20204000.spi
81:         0 uart-pl011
86:         1 mmc0
Err:        0

So the question is: why are there so many interrupts triggered by USB
when there is nothing really happening?

Especially I wonder why there are a constant 8000 interrupts/s.

I also wonder why I would have 1 MMC interrupt/s, when there is nothing
happening really on the SD-card...

Thanks,
	Martin

P.s: Here is some system info:

root at modelb:~# lsmod
Module                  Size  Used by
i2c_bcm2835             3755  0
spi_bcm2835             3479  0
uio_pdrv_genirq         3500  0
uio                     9822  1 uio_pdrv_genirq

root at modelb:~# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0b95:772b ASIX Electronics Corp.

Note that there is no huge difference in interrupts if I have the
network up and running (with both usb devices) and I am compiling a
kernel at the same time (running vmstat via ssh and not over the serial
line):

procs -----------memory---------- -swap- ---io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache si so  bi    bo   in   cs us sy id wa
 1  0      0  36860  20528 343976  0  0   9    57  230   87 61  4 18 17
 1  0      0  33760  20528 343976  0  0   0     0 8150  111 93  7  0  0
 1  0      0  31280  20528 343976  0  0   0     0 8147  110 93  7  0  0
 2  1      0  29296  20532 343976  0  0   0    84 7059   62 93  7  0  0
 1  0      0  25700  20536 343976  0  0   0     4 8102  112 96  4  0  0
 1  0      0  22600  20536 343976  0  0   0     0 8149   96 96  4  0  0
 1  0      0  19996  20536 344048  0  0  72     0 8279  103 96  3  0  1
 1  0      0  18756  20536 344048  0  0   0     0 8149   35 98  2  0  0
 1  0      0  17888  20536 344052  0  0   0     0 8150   30 97  3  0  0
 1  0      0  17268  20536 344060  0  0   0     0 8157   39 100  0  0  0
 1  0      0  17020  20536 344072  0  0   0     0 8155   36 100  0  0  0
 1  0      0  16152  20536 344076  0  0   0     0 8149   33 100  0  0  0
 1  0      0  15532  20536 344076  0  0   0     0 8157   36 100  0  0  0
 2  1      0  15036  20544 344100  0  0   0    12 8013   45 99  1  0  0
 2  0      0  14664  20544 344108  0  0   0     0 8149   41 98  2  0  0
 1  1      0  14416  20544 344124  0  0   0    80 8132   33 98  2  0  0
 0  2      0  12804  20544 345072  0  0   0     0 7960   42 88  4  0  8



More information about the linux-rpi-kernel mailing list