Received: from [140.186.70.92] (port=35775 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd0OY-0004vs-Ix for qemu-devel@nongnu.org; Wed, 12 Jan 2011 08:05:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd0OW-0004vE-Uo for qemu-devel@nongnu.org; Wed, 12 Jan 2011 08:05:46 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:24878 helo=SMTP.EU.CITRIX.COM) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd0OW-0004v7-NT for qemu-devel@nongnu.org; Wed, 12 Jan 2011 08:05:44 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <19757.42787.596001.450176@mariner.uk.xensource.com> Date: Wed, 12 Jan 2011 13:05:39 +0000 In-Reply-To: <4D2DA63E.2030506@redhat.com> References: <1294834760-24996-1-git-send-email-pbonzini@redhat.com> <19757.40902.900137.923740@mariner.uk.xensource.com> <4D2DA63E.2030506@redhat.com> From: Ian Jackson Subject: [Qemu-devel] Re: [PATCH v2] add event queueing to USB HID List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Stefano Stabellini , "qemu-devel@nongnu.org" , Gerd Hoffman Paolo Bonzini writes ("Re: [PATCH v2] add event queueing to USB HID"): > It's all pretty academic as in practice it worked well. The queue-full > code would never trigger in usb_pointer_event, and instead the queue > would be instantly emptied when a 17th event arrived. This is lucky > actually, because the device would also stop unqueuing from a full queue > if it had SET_IDLE 0. Both bugs happened because head==tail could mean > both "empty queue" and "full queue". I'm not even sure it's possible to > fill the queue in practice; even with a very high latency you'd have to > do 8 clicks in say half a second. I didn't try with a shorter queue, > which of course would have made the problems evident. Ah. head==tail was supposed to mean empty (as is conventional); I guess my "full" test just had an off-by-one error. > I don't disagree, but I think this is better left for a separate patch. > I see three reasons for this: > > 1) I would like to understand better the relation between GET_REPORT and > TOKEN_IN. If an event occurs between two TOKEN_IN messages, and the OS > sends a GET_REPORT in between, should the second TOKEN_IN return > USB_RET_NAK or not? With your patch it will, with current QEMU and my > patch it won't. In this sense, the "changed" flag is recording slightly > different information at least in my version of the code. Hrm. > 2) if buffering is implemented for the keyboard device (and it probably > should) most of the differences would go away again. True. > 3) Secondarily, this is the only part of your patch that would need > adjustments, since finite idle delays are now implemented. Right. OK. Thanks for your work. Acked-by: Ian Jackson Ian.