From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NyT9t-000303-QV for qemu-devel@nongnu.org; Sun, 04 Apr 2010 12:58:49 -0400 Received: from [140.186.70.92] (port=42352 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NyT9m-0002uQ-DF for qemu-devel@nongnu.org; Sun, 04 Apr 2010 12:58:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NyT9i-000054-GF for qemu-devel@nongnu.org; Sun, 04 Apr 2010 12:58:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52551) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NyT9i-0008WN-8W for qemu-devel@nongnu.org; Sun, 04 Apr 2010 12:58:38 -0400 Message-ID: <4BB8C51A.6070908@redhat.com> Date: Sun, 04 Apr 2010 19:58:02 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] High CPU use of -usbdevice tablet (was Re: KVM usability) References: <4B87A6BF.3090301@redhat.com> <4B938F9D.7010207@redhat.com> <20100404123116.GA19866@arachsys.com> <201004041525.18211.paul@codesourcery.com> In-Reply-To: <201004041525.18211.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Chris Webb , qemu-devel@nongnu.org, kvm@vger.kernel.org, =?UTF-8?B?SmVybmVqIFNpbW9uxI1pxI0=?= On 04/04/2010 05:25 PM, Paul Brook wrote: >>> Looks like the tablet is set to 100 Hz polling rate. We may be able >>> to get away with 30 Hz or even less (ep_bInterval, in ms, in >>> hw/usb-wacom.c). >>> >> Changing the USB tablet polling interval from 10ms to 100ms in both >> hw/usb-wacom.c and hw/usb-hid.c made no difference except the an increase >> in bInterval shown in lsusb -v in the guest and the hint of jerky mouse >> movement I expected from setting this value so high. A similar change to >> the polling interval for the keyboard and mouse also made no difference to >> their performance impact. >> > The USB HID devices implement the SET_IDLE command, so the polling interval > will have no real effect on performance. > On a Linux guest (F12), I see 125 USB interrupts per second with no mouse movement, so something is broken (on the guest or host). > My guess is that the overhead you're seeing is entirely from the USB host > adapter having to wake up and check the transport descriptor lists. This will > only result in the guest being woken if a device actually responds (as > mentioned above it should not). > A quick profile on the host side doesn't show this. Instead, I see a lot of select() overhead. Surprising as there are ~10 descriptors being polled, so ~1200 polls per second. Maybe epoll will help here. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.