[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/38] replay: check other timers for icount limit
From: |
Paolo Bonzini |
Subject: |
[PULL 04/38] replay: check other timers for icount limit |
Date: |
Wed, 8 Jan 2020 13:32:21 +0100 |
From: Pavel Dovgalyuk <address@hidden>
Record/replay can stall when there are no virtual devices that generate
events - it just uses all the time for vCPU thread. Therefore main loop
has to wait too much for the vCPU thread, because they are synchronized
in rr mode.
This patch does not let creating too long vCPU executions without
interrupting to main loop. It checks realtime timers that always exits
to control user input.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Message-Id:
<157675958855.14346.18049977447896411847.stgit@pasha-Precision-3630-Tower>
Signed-off-by: Paolo Bonzini <address@hidden>
---
cpus.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpus.c b/cpus.c
index b472378..be2d655 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1316,6 +1316,10 @@ static int64_t tcg_get_icount_limit(void)
*/
deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL,
QEMU_TIMER_ATTR_ALL);
+ /* Check realtime timers, because they help with input processing */
+ deadline = qemu_soonest_timeout(deadline,
+ qemu_clock_deadline_ns_all(QEMU_CLOCK_REALTIME,
+ QEMU_TIMER_ATTR_ALL));
/* Maintain prior (possibly buggy) behaviour where if no deadline
* was set (as there is no QEMU_CLOCK_VIRTUAL timer) or it is more than
--
1.8.3.1
- [PULL 00/38] Misc patches for 2020-01-08, Paolo Bonzini, 2020/01/08
- [PULL 01/38] x86: Check for machine state object class before typecasting it, Paolo Bonzini, 2020/01/08
- [PULL 03/38] hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35, Paolo Bonzini, 2020/01/08
- [PULL 02/38] accel/kvm: Make "kernel_irqchip" default on, Paolo Bonzini, 2020/01/08
- [PULL 04/38] replay: check other timers for icount limit,
Paolo Bonzini <=
- [PULL 05/38] replay: record and replay random number sources, Paolo Bonzini, 2020/01/08
- [PULL 06/38] hw/i386/x86-iommu: Add missing stubs, Paolo Bonzini, 2020/01/08
- [PULL 07/38] hw/i386/pc: fix regression in parsing vga cmdline parameter, Paolo Bonzini, 2020/01/08
- [PULL 08/38] hw/timer/Kconfig: Intel 8254 PIT depends of ISA bus, Paolo Bonzini, 2020/01/08
- [PULL 09/38] hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled, Paolo Bonzini, 2020/01/08
- [PULL 10/38] hw/intc/i8259: Fix Kconfig dependency on ISA bus, Paolo Bonzini, 2020/01/08
- [PULL 11/38] hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config, Paolo Bonzini, 2020/01/08
- [PULL 12/38] hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based platforms, Paolo Bonzini, 2020/01/08
- [PULL 13/38] hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices, Paolo Bonzini, 2020/01/08
- [PULL 14/38] hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices, Paolo Bonzini, 2020/01/08