From: Jamie Lokier <jamie@shareable.org>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Timer/clock for Linux
Date: Wed, 26 Apr 2006 18:26:30 +0100 [thread overview]
Message-ID: <20060426172629.GA27652@mail.shareable.org> (raw)
In-Reply-To: <200604261521.09177.paul@codesourcery.com>
Paul Brook wrote:
> On Wednesday 26 April 2006 14:01, Jamie Lokier wrote:
> > Paul Brook wrote:
> > > One solution (which is also desirable for other reasons) is to
> > > implement some form of guest cycle counting based on the
> > > instructions actually executed. Then use that as the high-precision
> > > timesource, and use some for of adaptive method to keep host and
> > > guest clocks in sync.
> >
> > That's what I meant, expressed more clearly, except that I meant to
> > count guest time based on the real time spent executing guest code,
> > rather than counting individual instructions. Thanks!
>
> How do you propose doing that? It implies you have some way of interrupting
> the guest after it has executed a small amount of guest code, where "small"
> is less than the resolution+latency of host timer interrupts.
Hmm. I hadn't thought that through, but it still works.
It doesn't matter if the guest runs, say, for 20ms before its next
emulated 1kHz interrupt - so long as it's not dependent on values from
the emulated timer chip after 1ms (or any other emulated device which
reveals the time).
If the guest does read a device which depends on the time, that's an
opportunity to interrupt it. Otherwise, from the guest's view, it's
just as if the emulated CPU got faster for a while with the interrupts
perfectly timed.
-- Jamie
next prev parent reply other threads:[~2006-04-26 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 2:10 [Qemu-devel] [PATCH] Timer/clock for Linux Kazu
[not found] ` <443E93A3.5060508@weilnetz.de>
2006-04-13 18:11 ` [Qemu-devel] [PATCH] Fix message in configure Stefan Weil
2006-04-24 21:41 ` [Qemu-devel] [PATCH] Timer/clock for Linux Fabrice Bellard
2006-04-25 0:16 ` Jamie Lokier
2006-04-25 21:10 ` Fabrice Bellard
2006-04-25 21:34 ` Jamie Lokier
2006-04-25 21:49 ` Paul Brook
2006-04-26 13:01 ` Jamie Lokier
2006-04-26 14:21 ` Paul Brook
2006-04-26 17:26 ` Jamie Lokier [this message]
2006-04-25 11:04 ` NyOS
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=20060426172629.GA27652@mail.shareable.org \
--to=jamie@shareable.org \
--cc=paul@codesourcery.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).