From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregkh Subject: Re: High CPU load produced by USB (DW2) Date: Wed, 7 Feb 2018 06:27:49 -0800 Message-ID: <20180207142749.GD29606@kroah.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mirza Krak Cc: linux-usb , johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-rockchip.vger.kernel.org On Wed, Feb 07, 2018 at 10:48:57AM +0100, Mirza Krak wrote: > Hi. > > I initially started a thread on a different mailing list [1], and you > can take look there for some additional background. > > I am using a 4.14.15 stable kernel on a RK3288 SoC (FireFly RK3288 > board) which uses the DW2 USB core. I have noticed that when > connecting a USB device there is unreasonable high CPU load produced > by the USB interrupts. That's a normal problem with that kind of hardware. I've seen devices with that type of USB core take a 30% cpu usage just when you plug a USB keyboard into the device. There's not much the kernel can do about horrible hardware, sorry, go complain to the device manufacturer :( > Here is one example with a MIDI keyboard connected on USB (not really > doing anything on it) > > 79 2 root SW 0 0% 19% [irq/45-dwc2_hso] > 78 2 root SW 0 0% 11% [irq/45-ff540000] It doesn't matter if anything is happening on the device, USB goes and polls the device all the time, that's just the way that the protocol works. With hardware like this, that polling is done by the kernel driver/CPU and does not have offload capability to the USB controller to handle this type of housekeeping. Because of that, you see tons of CPU interrupts and a high load. Again, not much we can do about that, sorry :( good luck! greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html