From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMPmd-0006l2-Fv for qemu-devel@nongnu.org; Tue, 17 May 2011 15:18:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMPmc-0004ZC-As for qemu-devel@nongnu.org; Tue, 17 May 2011 15:18:19 -0400 Received: from sj-iport-2.cisco.com ([171.71.176.71]:41847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMPmb-0004Z6-Vd for qemu-devel@nongnu.org; Tue, 17 May 2011 15:18:18 -0400 Message-ID: <4DD2C9F7.4050801@cisco.com> Date: Tue, 17 May 2011 13:18:15 -0600 From: David Ahern MIME-Version: 1.0 References: <1305575782-31766-1-git-send-email-kraxel@redhat.com> <1305575782-31766-19-git-send-email-kraxel@redhat.com> <4DD1E1DD.3060605@cisco.com> <4DD221AB.7070009@redhat.com> <4DD26D45.3070309@cisco.com> <4DD27D9D.1050109@cisco.com> <4DD28E0A.2050808@redhat.com> <4DD2AAC6.6060501@cisco.com> <4DD2B21D.8040502@redhat.com> <4DD2B3AB.8090408@cisco.com> <4DD2C217.9070006@redhat.com> <4DD2C81F.80507@cisco.com> In-Reply-To: <4DD2C81F.80507@cisco.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] USB streaming [Re: [PATCH 18/18] usb: add ehci adapter] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: qemu-devel@nongnu.org On 05/17/11 13:10, David Ahern wrote: >> Note that once every while a packet will get lost since normally a usb >> device is synced to the usb frame timer, but the real and emulated frame >> timer >> are not synced, so eventually a packet will get lost. > > I noticed that as well. The guest uhci driver (linux at least) guesses > where to put the initial request (10 frames out as I recall). From there > the requests need to flow - responses come into the guest, requests are > appended to the stream. > > One missed packet in the guest causes the driver to "start over" -- ie, > it's no longer a stream, but an initial request placed 10 frames out. > That causes an ugly jitter, and if the qemu controller happens to be > past the '10 frames out' guess by the OS you get a 1+ sec gap of silence. Oh yea, as I mentioned in the URL modifying the guest driver to have more outstanding URBs (at least 4 URBs with 5 packets per URB) was a key aspect of the solution as well -- keeping the guest OS and controller from losing sync. David > > David > >> >> Regards, >> >> Hans > >