Bug 172199 - [xhci] high interrupts load xhci
Summary: [xhci] high interrupts load xhci
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-01 09:20 UTC by Aleksei Reytsman
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Reytsman 2012-10-01 09:20:03 UTC
Hello.
I have a very high interrupts load on my FreeBSD machine. It happens when i plug any USB device (like a keyboard), and the load is still high after disconnecting the device. It becomes normal after reboot.
My system based on ASUS P8Z68-V Pro/Gen3 motherboard.
MYKERNEL is the GENERIC kernel with ipfw support.
Sorry for bad English.
Some debug information below:

# vmstat -i
interrupt                          total       rate
irq16: xhci1                 10760525071      17776
irq23: ehci0 ehci1               1826517          3
cpu0:timer                     619928626       1024
irq256: em0:rx 0                54277776         89
irq257: em0:tx 0                42013316         69
irq258: em0:link                       2          0
irq262: em2:rx 0               541775211        895
irq263: em2:tx 0               498677204        823
irq264: em2:link                       1          0
irq265: em3:rx 0               300580772        496
irq266: em3:tx 0               593156009        979
irq268: ahci0                    5757554          9
cpu1:timer                     123236782        203
cpu3:timer                     100504666        166
cpu2:timer                      58767827         97
Total                        13701027334      22634

# systat -vmstat
    1 users    Load  0.32  0.51  0.50                  Oct  1 11:52

Mem:KB    REAL            VIRTUAL                       VN PAGER   SWAP PAGER
        Tot   Share      Tot    Share    Free           in   out     in   out
Act 1481080  158408  5595688   175752 2913052  count
All 1581028  164260 1079516k   209568          pages
Proc:                                                            Interrupts
  r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        cow    173k total
            137      349k   24  122 171k 1055    3        zfod   166k xhci1 16
                                                          ozfod     3 ehci0 ehci
 0.1%Sys  18.0%Intr  0.0%User  0.0%Nice 81.9%Idle        %ozfod  1128 cpu0:timer
|    |    |    |    |    |    |    |    |    |    |       daefr    76 em0:rx 0
+++++++++                                                 prcfr    72 em0:tx 0
                                        17 dtbuf        3 totfr       em0:link
Namei     Name-cache   Dir-cache    204931 desvn          react  1216 em2:rx 0
   Calls    hits   %    hits   %    179871 numvn          pdwak  1146 em2:tx 0
     353     353 100                 49693 frevn          pdpgs       em2:link
                                                          intrn   933 em3:rx 0
Disks  ada0  ada1 pass0 pass1                      731484 wire   1312 em3:tx 0
KB/t  30.98 30.98  0.00  0.00                     1123916 act      24 ahci0 268
tps      12    12     0     0                     3233464 inact   914 cpu1:timer
MB/s   0.35  0.35  0.00  0.00                         276 cache   139 cpu3:timer
%busy     0     0     0     0                     2912776 free     72 cpu2:timer
                                                   837152 buf
# pciconf -lv
hostb0@pci0:0:0:0:      class=0x060000 card=0x844d1043 chip=0x01008086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '2nd Generation Core Processor Family DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
- - - - -
xhci0@pci0:4:0:0:       class=0x0c0330 card=0x84881043 chip=0x10421b21 rev=0x00 hdr=0x00
    vendor     = 'ASMedia Technology Inc.'
    device     = 'ASM1042 SuperSpeed USB Host Controller'
    class      = serial bus
    subclass   = USB
- - - - -
xhci1@pci0:7:0:0:       class=0x0c0330 card=0x84881043 chip=0x10421b21 rev=0x00 hdr=0x00
    vendor     = 'ASMedia Technology Inc.'
    device     = 'ASM1042 SuperSpeed USB Host Controller'
    class      = serial bus
    subclass   = USB

How-To-Repeat: Plug any USB device.
Comment 1 Hans Petter Selasky 2012-10-01 09:44:11 UTC
On Monday 01 October 2012 10:15:48 Aleksei Reytsman wrote:
> >Number:         172199
> >Category:       usb
> >Synopsis:       high interrupts load xhci
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-usb
> >State:          open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Mon Oct 01 08:20:03 UTC 2012
> >Closed-Date:
> >Last-Modified:
> >Originator:     Aleksei Reytsman
> >Release:        9.0
> 
> >Organization:
> Solvex-Tourne ltd
> 
> >Environment:
> # uname -a
> FreeBSD servergate 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Wed Mar 28 15:00:36
> MSK 2012     root@servergate:/usr/src/sys/amd64/compile/MYKERNEL  amd64
> 
> >Description:
> Hello.
> I have a very high interrupts load on my FreeBSD machine. It happens when i
> plug any USB device (like a keyboard), and the load is still high after
> disconnecting the device. It becomes normal after reboot. My system based
> on ASUS P8Z68-V Pro/Gen3 motherboard.
> MYKERNEL is the GENERIC kernel with ipfw support.
> Sorry for bad English.
> Some debug information below:
> 
> # vmstat -i
> interrupt                          total       rate
> irq16: xhci1                 10760525071      17776
> irq23: ehci0 ehci1               1826517          3
> cpu0:timer                     619928626       1024
> irq256: em0:rx 0                54277776         89
> irq257: em0:tx 0                42013316         69
> irq258: em0:link                       2          0
> irq262: em2:rx 0               541775211        895
> irq263: em2:tx 0               498677204        823
> irq264: em2:link                       1          0
> irq265: em3:rx 0               300580772        496
> irq266: em3:tx 0               593156009        979
> irq268: ahci0                    5757554          9
> cpu1:timer                     123236782        203
> cpu3:timer                     100504666        166
> cpu2:timer                      58767827         97
> Total                        13701027334      22634
> 
> # systat -vmstat
>     1 users    Load  0.32  0.51  0.50                  Oct  1 11:52
> 
> Mem:KB    REAL            VIRTUAL                       VN PAGER   SWAP
> PAGER Tot   Share      Tot    Share    Free           in   out     in  
> out Act 1481080  158408  5595688   175752 2913052  count
> All 1581028  164260 1079516k   209568          pages
> Proc:                                                            Interrupts
>   r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        cow    173k total
>             137      349k   24  122 171k 1055    3        zfod   166k xhci1
> 16 ozfod     3 ehci0 ehci 0.1%Sys  18.0%Intr  0.0%User  0.0%Nice 81.9%Idle
>        %ozfod  1128 cpu0:timer
> 
> |    |    |    |    |    |    |    |    |    |    |       daefr    76 em0:rx
> |    |    |    |    |    |    |    |    |    |    |       0
> 
> +++++++++                                                 prcfr    72
> em0:tx 0 17 dtbuf        3 totfr       em0:link Namei     Name-cache  
> Dir-cache    204931 desvn          react  1216 em2:rx 0 Calls    hits   % 
>   hits   %    179871 numvn          pdwak  1146 em2:tx 0 353     353 100  
>               49693 frevn          pdpgs       em2:link intrn   933 em3:rx
> 0 Disks  ada0  ada1 pass0 pass1                      731484 wire   1312
> em3:tx 0 KB/t  30.98 30.98  0.00  0.00                     1123916 act    
>  24 ahci0 268 tps      12    12     0     0                     3233464
> inact   914 cpu1:timer MB/s   0.35  0.35  0.00  0.00                      
>   276 cache   139 cpu3:timer %busy     0     0     0     0                
>     2912776 free     72 cpu2:timer 837152 buf
> # pciconf -lv
> hostb0@pci0:0:0:0:      class=0x060000 card=0x844d1043 chip=0x01008086
> rev=0x09 hdr=0x00 vendor     = 'Intel Corporation'
>     device     = '2nd Generation Core Processor Family DRAM Controller'
>     class      = bridge
>     subclass   = HOST-PCI
> - - - - -
> xhci0@pci0:4:0:0:       class=0x0c0330 card=0x84881043 chip=0x10421b21
> rev=0x00 hdr=0x00 vendor     = 'ASMedia Technology Inc.'
>     device     = 'ASM1042 SuperSpeed USB Host Controller'
>     class      = serial bus
>     subclass   = USB
> - - - - -
> xhci1@pci0:7:0:0:       class=0x0c0330 card=0x84881043 chip=0x10421b21
> rev=0x00 hdr=0x00 vendor     = 'ASMedia Technology Inc.'
>     device     = 'ASM1042 SuperSpeed USB Host Controller'
>     class      = serial bus
>     subclass   = USB
> 
> >How-To-Repeat:
> Plug any USB device.
> 
> >Fix:
> >
> >
> >Release-Note:
> >Audit-Trail:
> 
> >Unformatted:

Hi,

Can you collect some dmesg?

sysctl hw.usb.xhci.debug=16 ; sleep 1; sysctl hw.usb.xhci.debug=0

--HPS
Comment 2 vic 2012-11-22 07:09:03 UTC
>Hi,
>
>Can you collect some dmesg?
>
>sysctl hw.usb.xhci.debug=16 ; sleep 1; sysctl hw.usb.xhci.debug=0
>
>--HPS


Hi,

I have the same symptom, but with plugging and unplugging a monitor and also just toggling the monitor's power.
With the high interrupt happening I did your dmesg test. I got a whole bunch of :
xhci_interrupt: real interrupt (sts=0x00000000, iman=0x00000002)

I have seen this on a :
Gigabyte GA-Z77-DS3H (with Core i3-2120T)
Intel DH77KC (same Core i3-2120T)

I'm using the intergrated graphics on the cpu.
It doesn't matter whether the DSUB (only on the GA) or DVI port is used.

Currently I'm on the Intel board and its interrupt usage reported by systat -vmstat is :
Interrupts
159k total
atkbd0 1
158k xhci0 ehci
4 em1 17
56 ath0 19
2 ehci1 23
1127 cpu0:timer
2 em0 256
35 ahci0 257
16 cpu1:timer
10 cpu3:timer
22 cpu2:timer

Some more info about the system follows :

[root@bsd /]# uptime
 6:57AM  up 11:28, 1 user, load averages: 0.51, 0.38, 0.23


[root@bsd /]# uname -a
FreeBSD bsd.hostname.here 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Note that I saw the same thing when I tried 9.1RC3 amd64


[root@bsd /]# dmesg
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012
    root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
CPU: Intel(R) Core(TM) i3-2120T CPU @ 2.60GHz (2594.16-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x206a7  Family = 6  Model = 2a  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x159ae3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,TSCDLT,XSAVE,AVX>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
real memory  = 17179869184 (16384 MB)
avail memory = 16423026688 (15662 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <INTEL  DH77KC  >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
ACPI Warning: FADT (revision 5) is longer than ACPI 2.0 version, truncating length 268 to 244 (20110527/tbfadt-320)
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <INTEL DH77KC> on motherboard
acpi0: Power Button (fixed)
acpi0: reservation of 67, 1 (4) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xf000-0xf03f mem 0xf7800000-0xf7bfffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xf7d20000-0xf7d2ffff irq 16 at device 20.0 on pci0
xhci0: 32 byte context size.
usbus0 on xhci0
pci0: <simple comms> at device 22.0 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection 7.2.3> port 0xf080-0xf09f mem 0xf7d00000-0xf7d1ffff,0xf7d35000-0xf7d35fff irq 20 at device 25.0 on pci0
em0: Using an MSI interrupt
em0: Ethernet address: e8:40:f2:ab:e1:13
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xf7d34000-0xf7d343ff irq 16 at device 26.0 on pci0
usbus1: EHCI version 1.0
usbus1: <EHCI (generic) USB 2.0 controller> on ehci0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> irq 19 at device 28.7 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> irq 19 at device 0.0 on pci2
pci3: <ACPI PCI bus> on pcib3
ath0: <Atheros 5212> mem 0xf7c60000-0xf7c6ffff irq 19 at device 0.0 on pci3
ath0: AR2413 mac 7.9 RF2413 phy 4.5
em1: <Intel(R) PRO/1000 Legacy Network Connection 1.0.3> port 0xe000-0xe03f mem 0xf7c40000-0xf7c5ffff,0xf7c20000-0xf7c3ffff irq 17 at device 2.0 on pci3
em1: Ethernet address: 00:1b:21:29:a6:4c
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xf7d33000-0xf7d333ff irq 23 at device 29.0 on pci0
usbus2: EHCI version 1.0
usbus2: <EHCI (generic) USB 2.0 controller> on ehci1
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel Panther Point AHCI SATA controller> port 0xf0d0-0xf0d7,0xf0c0-0xf0c3,0xf0b0-0xf0b7,0xf0a0-0xf0a3,0xf060-0xf07f mem 0xf7d32000-0xf7d327ff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 5 on ahci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_button0: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 550
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
Event timer "HPET4" frequency 14318180 Hz quality 440
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: cannot reserve I/O port range
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
coretemp2: <CPU On-Die Thermal Sensors> on cpu2
est2: <Enhanced SpeedStep Frequency Control> on cpu2
coretemp3: <CPU On-Die Thermal Sensors> on cpu3
est3: <Enhanced SpeedStep Frequency Control> on cpu3
ZFS filesystem version 5
ZFS storage pool version 28
Timecounters tick every 1.000 msec
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 480Mbps High Speed USB v2.0
usbus2: 480Mbps High Speed USB v2.0
ugen0.1: <0x8086> at usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST2000DM001-9YN164 CC4H> ATA-8 SATA 3.x device
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <ST2000DM001-1CH164 CC24> ATA-8 SATA 3.x device
ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
ada1: Previously was known as ad6
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #2 Launched!
Timecounter "TSC-low" frequency 10133456 Hz quality 1000
Root mount waiting for: usbus2 usbus1 usbus0
uhub0: 8 ports with 8 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
Root mount waiting for: usbus2 usbus1
ugen1.2: <vendor 0x8087> at usbus1
uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
ugen2.2: <vendor 0x8087> at usbus2
uhub4: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus2
Root mount waiting for: usbus2 usbus1
uhub3: 6 ports with 6 removable, self powered
uhub4: 8 ports with 8 removable, self powered
Trying to mount root from zfs:zroot []...

[root@bsd /]# pciconf -lv
vgapci0@pci0:0:2:0:     class=0x030000 card=0x20318086 chip=0x01028086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '2nd Generation Core Processor Family Integrated Graphics Controller'
    class      = display
    subclass   = VGA

xhci0@pci0:0:20:0:      class=0x0c0330 card=0x20318086 chip=0x1e318086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Panther Point USB xHCI Host Controller'
    class      = serial bus
    subclass   = USB

-Victor
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:16 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped