From: Ingo Molnar <mingo@elte.hu>
To: Dor Laor <dor.laor@qumranet.com>
Cc: Avi Kivity <avik@qumranet.com>,
kvm-devel <kvm-devel@lists.sourceforge.net>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [kvm-devel] kvm & dyntick
Date: Sun, 14 Jan 2007 09:51:16 +0100 [thread overview]
Message-ID: <20070114085116.GD2913@elte.hu> (raw)
In-Reply-To: <64F9B87B6B770947A9F8391472E0321609F7A0E2@ehost011-8.exch011.intermedia.net>
* Dor Laor <dor.laor@qumranet.com> wrote:
> Afterwards we'll need to compensate the lost alarm signals to the
> guests by using one of
> - hrtimers to inject the lost interrupts for specific guests. The
> problem this will increase the overall load.
> - Injecting several virtual irq to the guests one after another
> (using interrupt window exit). The question is how the guest will be
> effected from this unfair behavior.
well, the most important thing would be to fix qemu to:
- not use a 1024 /dev/rtc stream of signals as its clock emulation
source
i hacked that out of qemu, only to find out that qemu then uses periodic
itimers. Instead of that it should use one-shot itimers, driven by the
expiry time of the next clock. I.e. this code in vl.c, in
host_alarm_handler():
if (qemu_timer_expired(active_timers[QEMU_TIMER_VIRTUAL],
qemu_get_clock(vm_clock)) ||
qemu_timer_expired(active_timers[QEMU_TIMER_REALTIME],
qemu_get_clock(rt_clock))) {
should start an itimer with an expiry time of:
active_timers[QEMU_TIMER_VIRTUAL]->expire_time - qemu_get_clock(vm_clock)
or:
active_timers[QEMU_TIMER_REALTIME]->expire_time - qemu_get_clock(rt_clock)
whichever is smaller. Furthermore, whenever timer->expire_time is
changed in qemu_mod_timer(), this set-the-next-itimer-expiry-time code
needs to be called. Would anyone like to try that?
this will reduce the host Qemu wakeup rate from 1000-1100/sec to the
guest's 4-5/sec wakeup rate - resulting in 0.01% CPU overhead from a
single idle guest. Current unmodified Qemu causes 10-20% CPU overhead
from a single idle guest.
Ingo
prev parent reply other threads:[~2007-01-14 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-11 16:08 kvm & dyntick Avi Kivity
2007-01-12 5:34 ` Rik van Riel
2007-01-12 6:20 ` Ingo Molnar
2007-01-12 10:19 ` Ingo Molnar
2007-01-12 17:04 ` Avi Kivity
2007-01-14 8:39 ` Ingo Molnar
2007-01-12 23:25 ` [kvm-devel] " Dor Laor
2007-01-12 23:39 ` Thomas Gleixner
2007-01-14 8:51 ` Ingo Molnar [this message]
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=20070114085116.GD2913@elte.hu \
--to=mingo@elte.hu \
--cc=avik@qumranet.com \
--cc=dor.laor@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@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