From: Avi Kivity <avi@qumranet.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: windows acpi time drift
Date: Wed, 19 Mar 2008 10:19:24 +0200 [thread overview]
Message-ID: <47E0CC8C.4020901@qumranet.com> (raw)
In-Reply-To: <47E051DB.9070506@codemonkey.ws>
Anthony Liguori wrote:
> Why don't we just introduce a vm-ioctl interface for a one-shot
> programmable timer? It could be programmed in userspace, and when it
> fires, we can drop down to userspace with a special exit code. We could
> then introduce an interrupt queuing mechanism in the kernel specifically
> for timer interrupts as you mention.
>
> That lets us remove the in-kernel PIT, and makes all of our timer
> mechanisms more accurate. If userspace has a better time mechanism,
> like hrtimer, then it can just use that. If hrtimer is good enough in
> userspace, then we can contain these new ioctls to the compat-code only.
>
The problems with timers are:
- on a loaded machine, several timer ticks may be coalesced together on
the host side; we need a way to detect overruns
- with one-shot processing, there is inevitable drift. so we need to
use periodic timers or to compensate for the drift
- when we have accumulated missed interrupts, we need to inject them
- we may need to coordinate tsc and timer values (like Xen)
the first two problems seem to be resolvable via posix timers
(timer_create() & friends). The third issue can be resolved by adding
an ioctl to queue a bunch of injections (raising and lowering a specific
line after the ack). The fourth is probably impossible from userspace
(and very difficult in the kernel).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-03-19 8:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 23:09 windows acpi time drift Dor Laor
2008-03-18 23:33 ` Dor Laor
2008-03-18 23:57 ` Anthony Liguori
2008-03-18 23:35 ` Anthony Liguori
2008-03-19 8:19 ` Avi Kivity [this message]
2008-03-19 14:09 ` Anthony Liguori
2008-03-19 15:39 ` Avi Kivity
2008-03-19 16:27 ` Dor Laor
2008-03-19 17:45 ` Avi Kivity
2008-03-19 0:07 ` Anthony Liguori
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=47E0CC8C.4020901@qumranet.com \
--to=avi@qumranet.com \
--cc=anthony@codemonkey.ws \
--cc=kvm-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox