AnsweredAssumed Answered

High CPU usage when using USB serials (ftdi)

Question asked by Heesung Yang on Jan 10, 2017

Hello,

I'm using kernel 4.8 on i.MX53.

My device uses 3 USB serial chipsets (ftdi) to collect data.

 

CPU usage on my previous kernel 2.6.38 was just 45~50%.

But on kernel 4.8.15 it exceeds 80%.

So I profiled using perf and top.

 

Most of the CPU resource is used on work_queue function in the USB driver.

Anybody has good ideas to reduce cpu usage?

 

Thank you.

 

1. perf report.

11.92% QSGRenderThread [kernel.kallsyms] [k] __do_softirq 
8.27% QSGRenderThread [kernel.kallsyms] [k] __usb_hcd_giveback_urb 
6.94% swapper [kernel.kallsyms] [k] __do_softirq 
6.37% swapper [kernel.kallsyms] [k] __usb_hcd_giveback_urb 
3.97% DisplayService [kernel.kallsyms] [k] __do_softirq 
2.02% swapper [kernel.kallsyms] [k] cpuidle_enter_state

2. Top result. --> in kernel 2.6 below 3 kworker was under 1%

Tasks: 108 total, 2 running, 106 sleeping, 0 stopped, 0 zombie
%Cpu(s): 48.9 us, 21.2 sy, 0.0 ni, 17.2 id, 0.0 wa, 0.0 hi, 12.8 si, 0.0 st

 

 9.5% kworker/u2:2
 8.0% kworker/u2:3
 2.1% kworker/u2:0

Outcomes