Bug 238235 - Interrupt storms from USB bluetooth dongle
Summary: Interrupt storms from USB bluetooth dongle
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 12.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-30 05:44 UTC by Yuichiro NAITO
Modified: 2019-06-07 11:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuichiro NAITO 2019-05-30 05:44:17 UTC
I'm using a bluetooth keyboard for FreeBSD 12.0-R box.
I found that lot's of interrupts come from USB bluetooth dongle.

$ env LC_ALL=C systat -vmstat

    1 users    Load  0.13  0.25  0.24                  May 30 14:21
   Mem usage:  42%Phy 28%Kmem
Mem: KB    REAL            VIRTUAL                      VN PAGER   SWAP PAGER
        Tot   Share      Tot    Share    Free           in   out     in   out
Act  489720   74344  528043K    92740 4635728  count
All  491424   75860  528066K   115680          pages
Proc:                                                            Interrupts
  r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        ioflt  2072 total
            151      4454    5  166 2035   53    3        cow         uart0 4
                                                          zfod      2 vgapci0 16
 0.2%Sys   0.2%Intr  0.0%User  0.0%Nice 99.6%Idle         ozfod    13 cpu0:timer
|    |    |    |    |    |    |    |    |    |           %ozfod     3 cpu1:timer
                                                          daefr     8 cpu2:timer
                                           dtbuf        3 prcfr    14 cpu3:timer
Namei     Name-cache   Dir-cache    212045 desvn        3 totfr  1999 xhci0 264
   Calls    hits   %    hits   %     52909 numvn          react     1 ahci0 265
      45      45 100                 41582 frevn          pdwak       hdac0 266
                                                       59 pdpgs    32 em0:irq0
Disks  ada0   cd0 pass0 pass1 pass2                       intrn
KB/t   0.00  0.00  0.00  0.00  0.00               2381176 wire
tps       0     0     0     1     0                153500 act
MB/s   0.00  0.00  0.00  0.00  0.00                818332 inact
%busy     0     0     0     0     0                   252 laund
                                                  4635728 free
                                                          buf

When I remove the bluetooth dongle, `systat -vmstat` show as follows.

    1 users    Load  0.25  0.14  0.16                  May 30 14:33
   Mem usage:  42%Phy 28%Kmem
Mem: KB    REAL            VIRTUAL                      VN PAGER   SWAP PAGER
        Tot   Share      Tot    Share    Free           in   out     in   out
Act  527812   75424  528176K    93956 4613172  count
All  529516   76940  528199K   116896          pages
Proc:                                                            Interrupts
  r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        ioflt    64 total
            156       313    4  155   33   51    1        cow         uart0 4
                                                          zfod      1 vgapci0 16
 0.0%Sys   0.1%Intr  0.1%User  0.0%Nice 99.8%Idle         ozfod    15 cpu0:timer
|    |    |    |    |    |    |    |    |    |           %ozfod     5 cpu1:timer
                                                          daefr     5 cpu2:timer
                                           dtbuf        8 prcfr     7 cpu3:timer
Namei     Name-cache   Dir-cache    212045 desvn        8 totfr       xhci0 264
   Calls    hits   %    hits   %     52916 numvn          react     1 ahci0 265
      35      35 100                 41591 frevn          pdwak       hdac0 266
                                                       67 pdpgs    30 em0:irq0
Disks  ada0   cd0 pass0 pass1 pass2                       intrn
KB/t   0.00  0.00  0.00  0.00  0.00               2387644 wire
tps       0     0     0     1     0                178324 act
MB/s   0.00  0.00  0.00  0.00  0.00                810580 inact
%busy     0     0     0     0     0                   252 laund
                                                  4613172 free
                                                          buf


`dmesg` shows my USB controller as follows.

xhci0: <Intel Sunrise Point USB 3.0 controller> mem 0xe1020000-0xe102ffff at dev
ice 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA

`usbconfig dump_device_desc` shows my bluetooth dongle as follows.

ugen0.4: <vendor 0x0a12 CSR8510 A10> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x00e0  <Wireless controller>
  bDeviceSubClass = 0x0001
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0a12
  idProduct = 0x0001
  bcdDevice = 0x8891
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0002  <CSR8510 A10>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001


I have tried 'sysctl hw.usb.xhci.use_polling=1', but nothing changed.