From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvCse-0003Ti-OJ for qemu-devel@nongnu.org; Wed, 29 Oct 2008 11:22:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvCsb-0003Rc-Ab for qemu-devel@nongnu.org; Wed, 29 Oct 2008 11:22:44 -0400 Received: from [199.232.76.173] (port=56323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvCsb-0003RZ-3e for qemu-devel@nongnu.org; Wed, 29 Oct 2008 11:22:41 -0400 Received: from mx2.redhat.com ([66.187.237.31]:49518) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvCsa-0004Rd-Ly for qemu-devel@nongnu.org; Wed, 29 Oct 2008 11:22:41 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9TFMdvN021885 for ; Wed, 29 Oct 2008 11:22:39 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9TFMcY4004577 for ; Wed, 29 Oct 2008 11:22:39 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9TFMb6n017661 for ; Wed, 29 Oct 2008 11:22:37 -0400 Received: from dhcp-1-237.local (localhost [127.0.0.1]) by dhcp-1-237.tlv.redhat.com (Postfix) with ESMTP id C332D18D4AF for ; Wed, 29 Oct 2008 17:22:36 +0200 (IST) From: Gleb Natapov Date: Wed, 29 Oct 2008 17:22:36 +0200 Message-ID: <20081029152236.14831.15193.stgit@dhcp-1-237.local> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RESEND][PATCH 0/3] Fix guest time drift under heavy load. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Qemu device emulation for timers might be inaccurate and causes coalescing of several IRQs into one. It happens when the load on the host is high and the guest did not manage to ack the previous IRQ. The problem can be reproduced by copying of a big file or many small ones inside Windows guest. When you do that guest clock start to lag behind the host one. The first patch in the series changes qemu_irq subsystem to return IRQ delivery status information. If device is notified that IRQs where lost it can regenerate them as needed. The following two patches add IRQ regeneration to PIC and RTC devices. --- Gleb Natapov (3): Fix time drift problem under high load when RTC is in use. Fix time drift problem under high load when PIT is in use. Change qemu_set_irq() to return status information. hw/apic.c | 103 +++++++++++++++++++++++++++++++++------------------- hw/arm_gic.c | 6 ++- hw/arm_pic.c | 4 ++ hw/arm_timer.c | 4 +- hw/cbus.c | 12 +++++- hw/esp.c | 4 ++ hw/etraxfs_pic.c | 12 ++++-- hw/fdc.c | 4 ++ hw/heathrow_pic.c | 4 ++ hw/i8254.c | 23 +++++++++++- hw/i8259.c | 19 +++++++--- hw/ide.c | 8 +++- hw/integratorcp.c | 4 ++ hw/irq.c | 18 +++++++-- hw/irq.h | 35 ++++++++++++------ hw/max7310.c | 4 ++ hw/mc146818rtc.c | 11 +++++- hw/mcf5206.c | 4 ++ hw/mcf_intc.c | 6 ++- hw/mips_int.c | 6 ++- hw/mpcore.c | 4 ++ hw/mst_fpga.c | 4 ++ hw/musicpal.c | 4 ++ hw/nseries.c | 7 +++- hw/omap.h | 2 + hw/omap1.c | 44 +++++++++++++++++----- hw/omap2.c | 12 +++++- hw/omap_dma.c | 8 +++- hw/omap_mmc.c | 4 ++ hw/openpic.c | 4 ++ hw/palm.c | 4 ++ hw/pc.c | 4 ++ hw/pc.h | 2 + hw/pci.c | 8 +++- hw/pcnet.c | 4 ++ hw/pl061.c | 4 ++ hw/pl190.c | 4 ++ hw/ppc.c | 18 ++++++--- hw/ppc4xx_devs.c | 6 ++- hw/pxa2xx.c | 4 ++ hw/pxa2xx_gpio.c | 6 ++- hw/pxa2xx_pcmcia.c | 6 ++- hw/pxa2xx_pic.c | 4 ++ hw/rc4030.c | 4 ++ hw/sbi.c | 6 ++- hw/sharpsl.h | 2 + hw/slavio_intctl.c | 8 +++- hw/sparc32_dma.c | 4 ++ hw/spitz.c | 20 ++++++++-- hw/ssd0323.c | 4 ++ hw/stellaris.c | 10 ++++- hw/sun4c_intctl.c | 4 ++ hw/sun4m.c | 7 +++- hw/tc6393xb.c | 5 ++- hw/tusb6010.c | 4 ++ hw/twl92230.c | 8 +++- hw/versatilepb.c | 4 ++ hw/zaurus.c | 4 ++ 58 files changed, 392 insertions(+), 160 deletions(-) -- Gleb.