From: Eduardo Habkost <ehabkost@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: kvm@vger.kernel.org
Subject: Re: 2.6.27.5 guest boot failure using in-kernel PIT
Date: Fri, 21 Nov 2008 15:06:42 -0200 [thread overview]
Message-ID: <20081121170642.GH30825@blackpad> (raw)
In-Reply-To: <20081121163922.GG30825@blackpad>
On Fri, Nov 21, 2008 at 02:39:22PM -0200, Eduardo Habkost wrote:
> On Fri, Nov 21, 2008 at 04:41:00PM +0100, Jan Kiszka wrote:
> > Eduardo Habkost wrote:
<snip>
> > > I am seeing the problem here
> > > when using the in-kernel PIT, but (surprisingly) my setup works when
> > > using -no-kvm-pit.
> >
> > Weird, makes no sense to me as well ATM.
>
> The qemu PIT seems to calculate the timeout for its timer as a function
> of the time where the PIT timer was set up (count_load_time) and the
> last timer set up (next_transition_time), without looking at the current
> time. After missing some ticks and getting the timer triggered late,
> it will set up a lot of "trigger on the past" timers before the guest
> finished the mdelay() loop.
>
> The in-kernel PIT seems to try to do the same thing (it just calls
> hrtimer_add_expires_ns() on the timer), but maybe the behaviour of the
> kernel timers is different of the qemu timers when a timer is set up
> to be triggered on the past. On my host-HZ=250 guest-HZ=1000 setup,
> it was incrementing pit_timer.pending only once every 4 milliseconds.
That's the case. From a probe on __pit_timer_fn.return:
19344471136382 timer_fn returning. timer expires now at: 19343448496177
19344475128359 timer_fn returning. timer expires now at: 19343449496025
19344479128694 timer_fn returning. timer expires now at: 19343450495873
19344483129394 timer_fn returning. timer expires now at: 19343451495721
The number at the beginning of the lines is ktime_get(). The timer
expiration time is on the past, but the kernel keeps triggering the
timer once every 4 ms.
--
Eduardo
next prev parent reply other threads:[~2008-11-21 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 14:22 2.6.27.5 guest boot failure using in-kernel PIT Eduardo Habkost
2008-11-20 22:05 ` Eduardo Habkost
2008-11-21 3:05 ` Sheng Yang
2008-11-21 7:54 ` Jan Kiszka
2008-11-21 13:17 ` Eduardo Habkost
2008-11-21 15:41 ` Jan Kiszka
2008-11-21 16:39 ` Eduardo Habkost
2008-11-21 17:06 ` Eduardo Habkost [this message]
2008-11-24 17:02 ` hrtimer_forward() semantics when using non-high-res timers Eduardo Habkost
2008-11-21 17:10 ` 2.6.27.5 guest boot failure using in-kernel PIT Marcelo Tosatti
2008-11-24 14:33 ` Glauber Costa
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=20081121170642.GH30825@blackpad \
--to=ehabkost@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.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