From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: seabios@seabios.org, Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] tsc: use kvmclock for calibration
Date: Fri, 10 Aug 2012 18:26:05 -0300 [thread overview]
Message-ID: <20120810212605.GA32628@amt.cnet> (raw)
In-Reply-To: <5024C1F3.80103@redhat.com>
On Fri, Aug 10, 2012 at 10:10:27AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> >>> (1) Use this patch (with alignment issue fixed of course).
> >>> (2) Do a full kvmclock implementation. Feels a bit like overkill.
> >>> (3) SeaBIOS can fallback to the PIT for timing on machines which
> >>> have no TSC. We could do that too in case we detect kvm ...
> >>
> >> What sort of timeouts are these? If seconds, maybe the rtc would be best.
> >
> > I vote for 3 so nobody has to maintain kvmclock code in SeaBIOS and Gerd
> > can fix the in-kernel PIT issues with GRUB (see Michaels message) while testing.
>
> (2) turned out to be not too bad when taking a shortcut: Go through an
> enable/disable cycle each time we read the clock, then just grab
> system_time. Not that efficient, but should be ok for seabios. Usually
> it checks the clock when sitting around idle, waiting for something to
> happen. And it simplifies the implementation alot as we can just skip
> all the tsc frequency & delta calculations.
>
> Draft patch attached. Comments?
Given the history of problems with kvmclock, would rather see it not
being used for delays, if possible. Your shortcut gets rid of a class of
problems, but there might be others (...).
Isnt pmtimer ioport usable? 14MHz.
Error handling in kvmclock_init is awkward.
Thanks
next prev parent reply other threads:[~2012-08-10 21:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 11:57 [PATCH] tsc: use kvmclock for calibration Gerd Hoffmann
2012-08-09 12:53 ` Avi Kivity
2012-08-09 13:25 ` [SeaBIOS] " Fred .
2012-08-09 13:57 ` Gerd Hoffmann
2012-08-09 14:01 ` Avi Kivity
2012-08-09 14:05 ` Avi Kivity
2012-08-09 14:12 ` Gerd Hoffmann
2012-08-09 14:17 ` Avi Kivity
2012-08-09 14:18 ` Gerd Hoffmann
2012-08-09 14:20 ` Avi Kivity
2012-08-09 19:02 ` Marcelo Tosatti
2012-08-12 10:56 ` Avi Kivity
2012-08-09 19:09 ` Marcelo Tosatti
2012-08-10 7:18 ` Gleb Natapov
2012-08-10 7:30 ` Gleb Natapov
2012-08-10 8:10 ` Gerd Hoffmann
2012-08-10 21:26 ` Marcelo Tosatti [this message]
2012-08-13 10:37 ` Gerd Hoffmann
2012-08-13 10:46 ` Gleb Natapov
2012-08-13 12:55 ` [SeaBIOS] " Fred .
2012-08-12 9:00 ` Avi Kivity
2012-08-09 18:59 ` Marcelo Tosatti
2012-08-12 9:01 ` Avi Kivity
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=20120810212605.GA32628@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=seabios@seabios.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).