From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread
Date: Wed, 23 Feb 2011 11:18:06 +0100 [thread overview]
Message-ID: <20110223101806.GA27880@edde.se.axis.com> (raw)
In-Reply-To: <1298278286-9158-1-git-send-email-pbonzini@redhat.com>
On Mon, Feb 21, 2011 at 09:51:22AM +0100, Paolo Bonzini wrote:
> This series redoes the way time spent waiting for I/O is accounted to
> the vm_clock.
>
> The current code is advancing qemu_icount before waiting for I/O.
> Instead, after the patch qemu_icount is left aside (it is a pure
> instruction counter) and qemu_icount_bias is changed according to
> the actual amount of time spent in the wait. This is more
> accurate, and actually works in the iothread case as well.
>
> (I started this as an experiment while trying to understand what was
> going on. But it fixes the bug and does not break the no-iothread
> case, so hey...).
>
> Patch 1 is a cleanup to Edgar's commit 225d02c (Avoid deadlock whith
> iothread and icount, 2011-01-23).
Thanks, this one was a good cleanup, I've applied it.
> Patch 2 fixes another misunderstanding in the role of qemu_next_deadline.
>
> Patches 3 and 4 implement the actual new accounting algorithm.
Sorry, I don't know the code well enough to give any sensible feedback
on patch 2 - 4. I did test them with some of my guests and things seem
to be OK with them but quite a bit slower.
I saw around 10 - 20% slowdown with a cris guest and -icount 10.
The slow down might be related to the issue with super slow icount together
with iothread (adressed by Marcelos iothread timeout patch).
> With these patches, iothread "-icount N" doesn't work when the actual
> execution speed cannot keep up with the requested speed; the execution
> in that case is not deterministic. It works when the requested speed
> is slow enough.
Sorry, would you mind explaning this a bit?
For example, if I have a machine and guest sw that does no IO. It runs
the CPU and only uses devices that use the virtual time (e.g timers
and peripherals that compute stuff). Can I expect the guest (with
fixed icount speed "-icount N") to run deterministically regardless of
host speed?
Cheers
next prev parent reply other threads:[~2011-02-23 10:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 8:51 [Qemu-devel] [PATCH 0/4] Improve -icount, fix it with iothread Paolo Bonzini
2011-02-21 8:51 ` [Qemu-devel] [PATCH 1/4] do not use qemu_icount_delta in the !use_icount case Paolo Bonzini
2011-02-21 8:51 ` [Qemu-devel] [PATCH 2/4] qemu_next_deadline should not consider host-time timers Paolo Bonzini
2011-02-21 8:51 ` [Qemu-devel] [PATCH 3/4] rewrite accounting of wait time to the vm_clock Paolo Bonzini
2011-02-21 8:51 ` [Qemu-devel] [PATCH 4/4] inline qemu_icount_delta Paolo Bonzini
2011-02-23 10:18 ` Edgar E. Iglesias [this message]
2011-02-23 10:25 ` [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread Paolo Bonzini
2011-02-23 11:08 ` Edgar E. Iglesias
2011-02-23 11:39 ` Jan Kiszka
2011-02-23 12:40 ` Edgar E. Iglesias
2011-02-23 12:45 ` Jan Kiszka
2011-02-25 19:33 ` Paolo Bonzini
2011-02-23 12:42 ` Paolo Bonzini
2011-02-23 16:27 ` Edgar E. Iglesias
2011-02-23 16:32 ` Paolo Bonzini
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=20110223101806.GA27880@edde.se.axis.com \
--to=edgar.iglesias@gmail.com \
--cc=pbonzini@redhat.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).