Re: kworker takes 100% core after unplugging usb c hub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yiyu Zhu

On 17.2.2021 10.50, Yiyu Zhu wrote:
> Hi Mathias,
> 
> Hi
> 
>>
>> Could you add usbcore dynamic debug, it should show more details about hub activity.
>>
>> mount -t debugfs none /sys/kernel/debug
>> echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
>>
> Here are the dmesg after I enabled dynamic debug.
> 

...

> (at hub disconnection)
> [18848.819858] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).
> [18848.999416] [drm] UVD and UVD ENC initialized successfully.
> [18849.100370] [drm] VCE initialized successfully.
> [18946.839352] usb 1-3: USB disconnect, device number 8
> [18946.839373] usb 1-3.1: USB disconnect, device number 9
> [18946.840644] usb 1-3.5: USB disconnect, device number 10
> [18946.890865] r8152 4-2.1.3:1.0 enx00e04cb5877c: Tx status -71
> [18946.916623] r8152 4-2.1.3:1.0 enx00e04cb5877c: Stop submitting
> intr, status -71
> [18947.068201] usb usb3-port2: over-current condition
> [18947.604290] usb 4-2: USB disconnect, device number 2
> [18947.604307] usb 4-2.1: USB disconnect, device number 3
> [18947.604315] usb 4-2.1.3: USB disconnect, device number 4
> [18947.604721] r8152 4-2.1.3:1.0 enx00e04cb5877c: Tx status -108
> [18947.604748] r8152 4-2.1.3:1.0 enx00e04cb5877c: Tx status -108
> [18947.604756] r8152 4-2.1.3:1.0 enx00e04cb5877c: Tx status -108
> [18947.604763] r8152 4-2.1.3:1.0 enx00e04cb5877c: Tx status -108
> [18947.685529] usb 4-2.1.4: USB disconnect, device number 5
> [18948.304163] usb usb4-port2: over-current condition
> 

Hmm, I think something went wrong when enabling usbcore dynamic degug.
I was expecting more hub messages.
Is CONFIG_DYNAMIC_DEBUG set?
Is this a snippet from console or dmesg? maybe some issues with log level
(/proc/sys/kernel/printk)?

The other cpu hogging worker was related to pm, maybe adding initcall_debug
boot option to the kernel cmdline could reveal something. 

>>
>> hub reports overcurrent condition, worth keeping in mind.
>>
> This condition can actually persist through reboot. Which causes the
> kworker to spawn immediately after boot.
> 
>>
>> Is this xHC contoller in a Alpine Ridge/Titan Ridge/Maple Ridge based system
>> that has runtime PM enabled by default, and whole xHC controller
>> disappears from PCI bus when last device is disconnected?
>> (check with lspci -nn)
>>
> It is an Alpine Ridge controller. Here is the `lspci -nn` output
> 
> 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen
> Core Processor Host Bridge/DRAM Registers [8086:5910] (rev 05)
> 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500
> v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 05)
> 00:02.0 VGA compatible controller [0300]: Intel Corporation Device
> [8086:591b] (rev 04)
> 00:04.0 Signal processing controller [1180]: Intel Corporation Xeon
> E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem
> [8086:1903] (rev 05)
> 00:13.0 Non-VGA unclassified device [0000]: Intel Corporation 100
> Series/C230 Series Chipset Family Integrated Sensor Hub [8086:a135]
> (rev 31)
> 00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230
> Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)
> 00:14.2 Signal processing controller [1180]: Intel Corporation 100
> Series/C230 Series Chipset Family Thermal Subsystem [8086:a131] (rev
> 31)
> 00:15.0 Signal processing controller [1180]: Intel Corporation 100
> Series/C230 Series Chipset Family Serial IO I2C Controller #0
> [8086:a160] (rev 31)
> 00:16.0 Communication controller [0780]: Intel Corporation 100
> Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev
> 31)
> 00:17.0 SATA controller [0106]: Intel Corporation HM170/QM170 Chipset
> SATA Controller [AHCI Mode] [8086:a103] (rev 31)
> 00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series
> Chipset Family PCI Express Root Port #1 [8086:a110] (rev f1)
> 00:1c.4 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series
> Chipset Family PCI Express Root Port #5 [8086:a114] (rev f1)
> 00:1c.5 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series
> Chipset Family PCI Express Root Port #6 [8086:a115] (rev f1)
> 00:1d.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series
> Chipset Family PCI Express Root Port #9 [8086:a118] (rev f1)
> 00:1e.0 Signal processing controller [1180]: Intel Corporation 100
> Series/C230 Series Chipset Family Serial IO UART #0 [8086:a127] (rev
> 31)
> 00:1e.2 Signal processing controller [1180]: Intel Corporation 100
> Series/C230 Series Chipset Family Serial IO GSPI #0 [8086:a129] (rev
> 31)
> 00:1f.0 ISA bridge [0601]: Intel Corporation HM175 Chipset LPC/eSPI
> Controller [8086:a152] (rev 31)
> 00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230
> Series Chipset Family Power Management Controller [8086:a121] (rev 31)
> 00:1f.3 Audio device [0403]: Intel Corporation CM238 HD Audio
> Controller [8086:a171] (rev 31)
> 00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset
> Family SMBus [8086:a123] (rev 31)
> 01:00.0 Display controller [0380]: Advanced Micro Devices, Inc.
> [AMD/ATI] Polaris 22 [Radeon RX Vega M GL] [1002:694e] (rev c0)
> 02:00.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:00.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:01.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:02.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:04.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 38:00.0 USB controller [0c03]: Intel Corporation JHL6540 Thunderbolt 3
> USB Controller (C step) [Alpine Ridge 4C 2016] [8086:15d4] (rev 02)
> 6d:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd.
> RTS525A PCI Express Card Reader [10ec:525a] (rev 01)
> 6e:00.0 Network controller [0280]: Intel Corporation Wireless 8265 /
> 8275 [8086:24fd] (rev 78)
> 6f:00.0 Non-Volatile memory controller [0108]: Sandisk Corp Device [15b7:5002]
> 
> One thing I notice is that when the hub is disconnected, the USB
> controller is still there.
> It will remain there until I plug and unplug another device. After
> that, the following section will be gone.
> 
> 02:00.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:00.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:01.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:02.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 03:04.0 PCI bridge [0604]: Intel Corporation JHL6540 Thunderbolt 3
> Bridge (C step) [Alpine Ridge 4C 2016] [8086:15d3] (rev 02)
> 38:00.0 USB controller [0c03]: Intel Corporation JHL6540 Thunderbolt 3
> USB Controller (C step) [Alpine Ridge 4C 2016] [8086:15d4] (rev 02)
> 
>> Does it help if another USB device is connected to a different
>> roothub port of this xHC while disconnecting the hub?
>> Or does just disabling runtime PM for this xhci help?
>>
> I tried with another usb device on the root hub port. But it does not help.
> I am not sure about how to disable runtime PM. I tried to use `echo on
>> .../0000:38:00.0/power/control` (its value was auto). But it also
> does not help.
> 
> Thanks
> Yiyu Zhu
> 

Ok, thanks for the info
-Mathias



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux