From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org, dor.laor@qumranet.com
Cc: Arnon Gilboa <arnon.gilboa@qumranet.com>
Subject: Re: [Qemu-devel] [PATCH] USB 2.0 EHCI emulation
Date: Tue, 8 Jan 2008 15:31:23 +0000 [thread overview]
Message-ID: <200801081531.27719.paul@codesourcery.com> (raw)
In-Reply-To: <1199781789.4421.7.camel@localhost.localdomain>
On Tuesday 08 January 2008, Dor Laor wrote:
> On Tue, 2008-01-08 at 01:30 +0000, Paul Brook wrote:
> > > -The host kernel was configured with dynamic tick & hi-res timers, to
> > > allow the desired timer resolution. USB 2.0 microframe is 125usec.
>
> It still works even without accurate timing demands.
> Only isochronous mode will have problems and it is not yet supported for
> ehci.
It could also cause problems for periodic interrupt transfers. It's not
uncommon for linux hosts to have a minimum timer period of 10ms (100Hz). This
means the periodic list will be traversed 80x slower than it should, so a
typical for a mouse or tablet with a 10ms poll interval will only be polled
every 800ms. 800ms lag on a mouse is unacceptable.
The existing USB hosts have similar issues. However the problem is an order of
magnitude less severe, so isn't noticeable under normal circumstances.
> > Requiring a 8kHz timer is a non-starter.
> >
> > The 100kHz "retry" timer is even more bogus.
> >
> > Qemu isn't capable of this kind of realtime response. You need to figure
> > out an implementation that doesn't require extremely fine grained timers.
> > In paractice you're unlikely to get better than 10ms timer resolution,
> > and 100ms latency isn't that uncommon.
> >
> > Paul
>
> Latest Linux host compiled HR_TIMER and DYN_TICK can give pretty good
> accuracy, surely it can provide 1khz and probably even 8khz
Only if the host is lightly loaded. qemu tends to use a lot of CPU, so
scheduler heuristics will tend to give it a low priority. c.f. an mp3 player
that uses a small amount of CPU, so the scheduler will try hard to provide
prompt signal delivery.
Paul
next prev parent reply other threads:[~2008-01-08 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 17:41 [Qemu-devel] [PATCH] USB 2.0 EHCI emulation Arnon Gilboa
2008-01-08 1:30 ` Paul Brook
2008-01-08 8:31 ` Arnon Gilboa
2008-01-08 8:43 ` Dor Laor
2008-01-08 15:31 ` Paul Brook [this message]
2008-01-08 17:14 ` Avi Kivity
[not found] <AchjJ1AuK1ctRXY/TRuiwwGi1wuGgA==>
2008-01-30 10:03 ` Arnon Gilboa
2008-02-28 19:46 ` Gerb Stralko
2008-02-29 7:33 ` Arnon Gilboa
2008-02-29 14:17 ` Gerb Stralko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200801081531.27719.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=arnon.gilboa@qumranet.com \
--cc=dor.laor@qumranet.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.