All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Kent <mkent-rTVjrLRGJfNWk0Htik3J/w@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: kvm very slow
Date: Thu, 09 Aug 2007 16:23:19 -0700	[thread overview]
Message-ID: <1186701799.14529.44.camel@fuego> (raw)
In-Reply-To: <1185945769.3342.15.camel@vaio>

[-- Attachment #1: Type: text/plain, Size: 2571 bytes --]

On Wed, 2007-01-08 at 07:22 +0200, Ulrich Schreiner wrote:
> hi,
> 
> im using a 64 bit fedora7 system with a quad-core processor to host
> multiple virtual machines.
> 

literally the exact same setup here

> my current kernel is:
> 
> Linux testserver 2.6.22.1-27.fc7 #1 SMP Tue Jul 17 17:19:58 EDT 2007
> x86_64 x86_64 x86_64 GNU/Linux
> 
> (now there is a 2.6.22.1-33.fc7 to download, but i think it is not the
> point here).
> 

2.6.22.1-41.fc7 x86_64 host

> i installed
> 
>   kvm.x86_64: 31-1.fc8

kvm-33

> 
> because of a crash i reported as a bug with the older kvm module.
> 
> this system starts a F7 image with the following command:
> 
> /usr/bin/qemu-kvm 
>   -net nic,macadr=52.54.00.12.34.57 
>   -net tap,script=./ifup.py,ifname=tap0
>   -hda /var/qemu/vm_images/F7image.img 
>   -boot c: -m 512 -vnc :2 -k de
> 
> inside the image there is fedora 7, but a 32bit system.
> 

almost exact same as here except using 32 bit fedora rawhide
(development) guest running kernel 2.6.23-0.74.rc2.git1.fc8

> almost everything works (reboot hangs), but the system is extremely
> slow! the clock inside the system is extremely slow: every *virtual*
> second in the image is about two or more seconds in the *real* world.

and I'm having the exact same issue here. The hardware clock works fine
(least from the output of /proc/driver/rtc and hwclock) but the system
time quickly falls behind in the guest, approx 0.5 secs for every 1 real
second.

No combination of selecting different clocksources in the guest,
disabling CONFIG_NO_HZ, etc seemed to make any difference. And the fact
is my fc7 x86_64 install works just great so I doubt its the host.

What I did notice though was ACPI wasn't being enabled by default for
the 32bit kernel with the message

ACPI: no DMI BIOS year, acpi=force is required to enable ACPI

and that the acpi_pm clocksource the x86_64 guest picked by default,
which worked fine, was missing. eg:

2.6.23-0.74.rc2.git1.fc8 i686 default boot:

/sys/devices/system/clocksource/clocksource0/available_clocksource
pit jiffies tsc
/sys/devices/system/clocksource/clocksource0/current_clocksource
pit

2.6.23-0.74.rc2.git1.fc8 i686 with acpi=force:

/sys/devices/system/clocksource/clocksource0/available_clocksource
tsc acpi_pm pit jiffies
/sys/devices/system/clocksource/clocksource0/current_clocksource
tsc

and now everything seems great, hardware and system time seem 1:1
again. 

Attached is a diff of the dmesg from each boot.

As to why this is...
-- 
Matthew Kent <mkent-rTVjrLRGJfNWk0Htik3J/w@public.gmane.org>
http://magoazul.com

[-- Attachment #2: acpi.diff --]
[-- Type: text/x-patch, Size: 9260 bytes --]

--- dmesg.f7_32bit_default	2007-08-09 16:00:00.000000000 -0700
+++ dmesg.f7_32bit_forced_acpi	2007-08-09 15:59:55.000000000 -0700
@@ -34,21 +34,30 @@
 ACPI: FACS 1FFF00C0, 0040
 ACPI: APIC 1FFF0938, 0040 (r1 QEMU   QEMUAPIC        1 QEMU        1)
 ACPI: no DMI BIOS year, acpi=force is required to enable ACPI
-ACPI: Disabling ACPI support
+ACPI: acpi=force override
+ACPI: PM-Timer IO Port: 0xb008
+ACPI: Local APIC address 0xfee00000
+ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
+Processor #0 6:2 APIC version 17
+ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
+IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
+ACPI: IRQ11 used by override.
+Enabling APIC mode:  Flat.  Using 1 I/O APICs
+Using ACPI (MADT) for SMP configuration information
 Allocating PCI resources starting at 30000000 (gap: 20000000:dffc0000)
 swsusp: Registered nosave memory region: 000000000009f000 - 00000000000a0000
 swsusp: Registered nosave memory region: 00000000000a0000 - 00000000000e8000
 swsusp: Registered nosave memory region: 00000000000e8000 - 0000000000100000
 Built 1 zonelists in Zone order.  Total pages: 129265
-Kernel command line: ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0 debug
-Found and enabled local APIC!
+Kernel command line: ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0 debug acpi=force
 mapped APIC to ffffb000 (fee00000)
+mapped IOAPIC to ffffa000 (fec00000)
 Enabling fast FPU save and restore... done.
 Enabling unmasked SIMD FPU exception support... done.
 Initializing CPU#0
 CPU 0 irqstacks, hard=c0817000 soft=c07f7000
 PID hash table entries: 2048 (order: 11, 8192 bytes)
-Detected 2400.636 MHz processor.
+Detected 2400.387 MHz processor.
 Console: colour VGA+ 80x25
 console [tty0] enabled
 console [ttyS0] enabled
@@ -75,7 +84,7 @@
       .text : 0xc0400000 - 0xc063074d   (2241 kB)
 Checking if this processor honours the WP bit even in supervisor mode... Ok.
 SLUB: Genslabs=22, HWalign=64, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
-Calibrating delay using timer specific routine.. 9619.97 BogoMIPS (lpj=4809986)
+Calibrating delay using timer specific routine.. 9622.99 BogoMIPS (lpj=4811496)
 Security Framework v1.0.0 initialized
 SELinux:  Initializing.
 SELinux:  Starting in permissive mode
@@ -92,8 +101,13 @@
 Checking 'hlt' instruction... OK.
 SMP alternatives: switching to UP code
 Freeing SMP alternatives: 12k freed
+ACPI: Core revision 20070126
 CPU0: Intel QEMU Virtual CPU version 0.9.0 stepping 03
-SMP motherboard not detected.
+Total of 1 processors activated (9622.99 BogoMIPS).
+ENABLING IO-APIC IRQs
+..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1
+APIC calibration not consistent with PM Timer: 199ms instead of 100ms
+APIC delta adjusted to PM-Timer: 6249985 (12499675)
 Brought up 1 CPUs
 sizeof(vma)=84 bytes
 sizeof(page)=56 bytes
@@ -106,25 +120,36 @@
 khelper used greatest stack depth: 3160 bytes left
 Booting paravirtualized kernel on bare hardware
 khelper used greatest stack depth: 3084 bytes left
-Time: 22:48:42  Date: 07/09/107
+Time: 22:55:44  Date: 07/09/107
 NET: Registered protocol family 16
+ACPI: bus type pci registered
 PCI: PCI BIOS revision 2.10 entry at 0xfa130, last bus=0
 PCI: Using configuration type 1
 Setting up standard PCI resources
-khelper used greatest stack depth: 2928 bytes left
-ACPI: Interpreter disabled.
-Linux Plug and Play Support v0.97 (c) Adam Belay
-pnp: PnP ACPI: disabled
-usbcore: registered new interface driver usbfs
-usbcore: registered new interface driver hub
-usbcore: registered new device driver usb
-PCI: Probing PCI hardware
-PCI: Probing PCI hardware (bus 00)
+ACPI: Interpreter enabled
+ACPI: (supports)
+ACPI: Using IOAPIC for interrupt routing
+khelper used greatest stack depth: 2944 bytes left
+ACPI: PCI Root Bridge [PCI0] (0000:00)
 * Found PM-Timer Bug on the chipset. Due to workarounds for a bug,
 * this clock source is slow. Consider trying other clock sources
 PCI quirk: region b000-b03f claimed by PIIX4 ACPI
 PCI quirk: region b100-b10f claimed by PIIX4 SMB
-PCI: Using IRQ router PIIX/ICH [8086/7000] at 0000:00:01.0
+ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
+ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12)
+ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12)
+ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11 12)
+ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 12)
+Linux Plug and Play Support v0.97 (c) Adam Belay
+pnp: PnP ACPI init
+ACPI: bus type pnp registered
+pnp: PnP ACPI: found 6 devices
+ACPI: ACPI bus type pnp unregistered
+usbcore: registered new interface driver usbfs
+usbcore: registered new interface driver hub
+usbcore: registered new device driver usb
+PCI: Using ACPI for IRQ routing
+PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
 NetLabel: Initializing
 NetLabel:  domain hash size = 128
 NetLabel:  protocols = UNLABELED CIPSOv4
@@ -139,10 +164,10 @@
 checking if image is initramfs... it is
 Freeing initrd memory: 3801k freed
 apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
+apm: overridden by ACPI.
 audit: initializing netlink socket (disabled)
-audit(1186699721.596:1): initialized
+audit(1186700143.557:1): initialized
 Total HugeTLB memory allocated, 0
-khelper used greatest stack depth: 2888 bytes left
 VFS: Disk quotas dquot_6.5.1
 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
 SELinux:  Registering netfilter hooks
@@ -159,17 +184,19 @@
 Activating ISA DMA hang workarounds.
 Boot video device is 0000:00:02.0
 pci_hotplug: PCI Hot Plug PCI Core version: 0.5
-khelper used greatest stack depth: 2860 bytes left
 isapnp: Scanning for PnP cards...
+Switched to high resolution mode on CPU 0
 isapnp: No Plug & Play device found
 Generic RTC Driver v1.07
 Non-volatile memory driver v1.2
 Linux agpgart interface v0.102
 Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
 serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450
+00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450
 RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize
+khelper used greatest stack depth: 2784 bytes left
 input: Macintosh mouse button emulation as /class/input/input0
-PNP: No PS/2 controller found. Probing ports directly.
+PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
 serio: i8042 KBD port at 0x60,0x64 irq 1
 serio: i8042 AUX port at 0x60,0x64 irq 12
 mice: PS/2 mouse device common for all mice
@@ -182,17 +209,15 @@
 NET: Registered protocol family 1
 NET: Registered protocol family 17
 Using IPI No-Shortcut mode
-  Magic number: 3:809:855
+  Magic number: 3:912:956
 drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
 Freeing unused kernel memory: 568k freed
 Write protecting the kernel read-only data: 916k
-Clocksource tsc unstable (delta = 542506452 ns)
-Time: pit clocksource has been installed.
+input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
 USB Universal Host Controller Interface driver v3.0
-insmod used greatest stack depth: 2492 bytes left
+insmod used greatest stack depth: 2340 bytes left
 ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
-insmod used greatest stack depth: 2400 bytes left
-input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
+insmod used greatest stack depth: 2312 bytes left
 SCSI subsystem initialized
 libata version 2.21 loaded.
 ata_piix 0000:00:01.1: version 2.11
@@ -220,28 +245,25 @@
 scsi 1:0:0:0: CD-ROM            QEMU     QEMU CD-ROM      0.9. PQ: 0 ANSI: 5
 insmod used greatest stack depth: 876 bytes left
 device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
-EXT3-fs: INFO: recovery required on readonly filesystem.
-EXT3-fs: write access will be enabled during recovery.
 kjournald starting.  Commit interval 5 seconds
-EXT3-fs: dm-0: orphan cleanup on readonly fs
-ext3_orphan_cleanup: deleting unreferenced inode 2254377
-EXT3-fs: dm-0: 1 orphan inode deleted
-EXT3-fs: recovery complete.
 EXT3-fs: mounted filesystem with ordered data mode.
 SELinux:  Disabled at runtime.
 SELinux:  Unregistering netfilter hooks
-audit(1186699726.899:2): selinux=0 auid=4294967295
+audit(1186700148.939:2): selinux=0 auid=4294967295
 sd 0:0:0:0: Attached scsi generic sg0 type 0
 scsi 1:0:0:0: Attached scsi generic sg1 type 5
 sr0: scsi3-mmc drive: 4x/4x xa/form2 tray
 Uniform CD-ROM driver Revision: 3.20
 sr 1:0:0:0: Attached scsi CD-ROM sr0
-ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
-PCI: setting IRQ 11 as level-triggered
-PCI: Found IRQ 11 for device 0000:00:03.0
-eth0: RealTek RTL-8029 found at 0xc100, IRQ 11, 52:54:00:12:34:56.
 piix4_smbus 0000:00:01.3: Found 0000:00:01.3 device
+ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
+ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
+ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKC] -> GSI 10 (level, low) -> IRQ 10
+eth0: RealTek RTL-8029 found at 0xc100, IRQ 10, 52:54:00:12:34:56.
+parport_pc 00:04: reported by Plug and Play ACPI
+parport0: PC-style at 0x378, irq 7 [PCSPP,EPP]
 FDC 0 is a S82078B
+No dock devices found.
 device-mapper: multipath: version 1.0.5 loaded
 EXT3 FS on dm-0, internal journal
 kjournald starting.  Commit interval 5 seconds

[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-08-09 23:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01  5:22 kvm very slow Ulrich Schreiner
2007-08-01 16:41 ` Avi Kivity
     [not found]   ` <46B0B7D0.9080203-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-01 19:45     ` Ulrich Schreiner
     [not found]       ` <46B0E2F0.1070701-sZDnKEZIvs8b1SvskN2V4Q@public.gmane.org>
2007-08-02  8:24         ` Avi Kivity
     [not found]           ` <46B194C5.5040508-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-02 19:31             ` Ulrich Schreiner
2007-08-07  7:20             ` Ulrich Schreiner
2007-08-07  7:44               ` Dor Laor
     [not found]                 ` <64F9B87B6B770947A9F8391472E032160D17A0EA-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-07  9:43                   ` Ulrich Schreiner
2007-08-07 11:32                     ` Luca
2007-08-07 11:51                     ` Dor Laor
     [not found]                       ` <64F9B87B6B770947A9F8391472E032160D17A197-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-07 12:08                         ` Luca
     [not found]                           ` <68676e00708070508w3d9e5ab8gd26263c44bf59f0d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-07 12:30                             ` Dor Laor
     [not found]                               ` <64F9B87B6B770947A9F8391472E032160D17A1C2-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-07 12:50                                 ` Ulrich Schreiner
2007-08-07 14:38                                 ` Dong, Eddie
     [not found]                                   ` <10EA09EFD8728347A513008B6B0DA77A01E45A1D-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-07 14:50                                     ` Dor Laor
2007-08-07 20:49                             ` Luca Tettamanti
     [not found]                               ` <20070807204922.GA27976-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2007-08-08  6:28                                 ` Ulrich Schreiner
2007-08-07 12:25                         ` Ulrich Schreiner
2007-08-09 23:23 ` Matthew Kent [this message]
2007-08-10  0:09   ` Matthew Kent
2007-08-10  5:32     ` Ulrich Schreiner
2007-08-10  6:39     ` Ulrich Schreiner
2007-08-16  9:56   ` Avi Kivity

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=1186701799.14529.44.camel@fuego \
    --to=mkent-rtvjrlrgjfnwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.