From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: [Qemu-devel] High CPU use of -usbdevice tablet (was Re: KVM usability) Date: Sun, 4 Apr 2010 22:03:05 +0100 Message-ID: <201004042203.06119.paul@codesourcery.com> References: <4B87A6BF.3090301@redhat.com> <201004041525.18211.paul@codesourcery.com> <4BB8C51A.6070908@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Chris Webb , kvm@vger.kernel.org, Jernej =?utf-8?q?Simon=C4=8Di=C4=8D?= To: qemu-devel@nongnu.org Return-path: Received: from mail.codesourcery.com ([38.113.113.100]:53258 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115Ab0DDVDK (ORCPT ); Sun, 4 Apr 2010 17:03:10 -0400 In-Reply-To: <4BB8C51A.6070908@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: > > 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). Turns out to be a a bug in the UHCI emulation. It should only raise an interrupt if the transfer actually completes (i.e. the active bit is set to zero). Fixed by 5bd2c0d7. I was testing with an OHCI controller, which does not have this bug. Paul From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NyWyP-000113-04 for qemu-devel@nongnu.org; Sun, 04 Apr 2010 17:03:13 -0400 Received: from [140.186.70.92] (port=57538 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NyWyN-00010d-PT for qemu-devel@nongnu.org; Sun, 04 Apr 2010 17:03:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NyWyM-00023L-CB for qemu-devel@nongnu.org; Sun, 04 Apr 2010 17:03:11 -0400 Received: from mx20.gnu.org ([199.232.41.8]:64700) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NyWyM-00023F-7f for qemu-devel@nongnu.org; Sun, 04 Apr 2010 17:03:10 -0400 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NyWyL-0000X2-Hr for qemu-devel@nongnu.org; Sun, 04 Apr 2010 17:03:09 -0400 From: Paul Brook Subject: Re: [Qemu-devel] High CPU use of -usbdevice tablet (was Re: KVM usability) Date: Sun, 4 Apr 2010 22:03:05 +0100 References: <4B87A6BF.3090301@redhat.com> <201004041525.18211.paul@codesourcery.com> <4BB8C51A.6070908@redhat.com> In-Reply-To: <4BB8C51A.6070908@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201004042203.06119.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Chris Webb , Jernej@gnu.org, Avi Kivity , kvm@vger.kernel.org, =?utf-8?q?Simon=C4=8Di=C4=8D?= > > 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). Turns out to be a a bug in the UHCI emulation. It should only raise an interrupt if the transfer actually completes (i.e. the active bit is set to zero). Fixed by 5bd2c0d7. I was testing with an OHCI controller, which does not have this bug. Paul