[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/4] Improve -icount, fix it with iothread
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 0/4] Improve -icount, fix it with iothread |
Date: |
Mon, 21 Feb 2011 09:51:22 +0100 |
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).
Patch 2 fixes another misunderstanding in the role of qemu_next_deadline.
Patches 3 and 4 implement the actual new accounting algorithm.
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.
(side note: all occurrences of wrong braces are in code that is purely
moved and/or reindented, _and_ that in fact disappears in subsequent
patches. So, I plead myself innocent).
Paolo Bonzini (4):
do not use qemu_icount_delta in the !use_icount case
qemu_next_deadline should not consider host-time timers
rewrite accounting of wait time to the vm_clock
inline qemu_icount_delta
qemu-timer.c | 114 ++++++++++++++++++++++++---------------------------------
1 files changed, 48 insertions(+), 66 deletions(-)
--
1.7.3.5
- [Qemu-devel] [PATCH 0/4] Improve -icount, fix it with iothread,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 1/4] do not use qemu_icount_delta in the !use_icount case, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 3/4] rewrite accounting of wait time to the vm_clock, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 4/4] inline qemu_icount_delta, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 2/4] qemu_next_deadline should not consider host-time timers, Paolo Bonzini, 2011/02/21
- [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread, Edgar E. Iglesias, 2011/02/23
- [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread, Paolo Bonzini, 2011/02/23
- [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread, Edgar E. Iglesias, 2011/02/23
- [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread, Jan Kiszka, 2011/02/23
- [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread, Edgar E. Iglesias, 2011/02/23
- [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread, Jan Kiszka, 2011/02/23