Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKZnb-0004aC-NC for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKZnZ-0004Zi-Gb for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKZnZ-0004Ze-C5 for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:49 -0500 Received: from mailout14.yourhostingaccount.com ([65.254.253.114]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JKZnZ-0004tf-0T for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:49 -0500 Received: from mailscan10.yourhostingaccount.com ([10.1.15.10] helo=mailscan10.yourhostingaccount.com) by mailout14.yourhostingaccount.com with esmtp (Exim) id 1JKZnR-0000R2-RD for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:41 -0500 Received: from impout03.yourhostingaccount.com ([10.1.55.3] helo=impout03.yourhostingaccount.com) by mailscan10.yourhostingaccount.com with esmtp (Exim) id 1JKZnQ-000653-Pt for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:40 -0500 Received: from nas.unichrom.com ([86.57.159.192] helo=lane) by authsmtp09.yourhostingaccount.com with esmtpa (Exim) id 1JKZnP-0006d3-0Z for qemu-devel@nongnu.org; Thu, 31 Jan 2008 08:49:40 -0500 Message-ID: From: "Sergey Bychkov" References: <8122F5B3F5384F6EB9822FC6673E6BA3@intranet> Subject: [Qemu-devel] More about slow clock in guest OS Date: Thu, 31 Jan 2008 15:19:56 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Sender: "Sergey Bychkov" 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 ----- Original Message ----- From: "Mulyadi Santosa" To: Sent: 26.01.2008 16:25 Subject: Re: [Qemu-devel] Slow clock in guest OS >> Sorry, did You mean "http://fabrice.bellard.free.fr/qemu/qemu-tech.html" >> or >> what? > > yep...that's the one... As I can see, this document anything about what to do if qemu hung :) After some investigations I can say that with the latest (2008/01/30) qemu from cvs, compiled with gcc-3.4 on linux x86_64 host, guest OS win2k3 works not too good. With "-clock dynticks" clock in OS is very slow - and windows time server can't adjust. With "-clock rtc" hung periodically - for up to 5 minutes, 300 seconds. This could happen at bootstrap - when no OS, only BIOS. Then it resumes and works for some random period of time, then hangs again, and so on. This behaviour doesn't depend on guest OS, and was reproduced with Knoppix live CD. Note that host should be periodically busy executing something like torrent client. Details and startup scripts: $ cat knoppix-qemu-nographic.sh == QEMU=$HOME/bin/qemu-system-x86_64 [ -x "$QEMU" ] || QEMU=/usr/bin/qemu-system-x86_64 sudo modprobe kqemu echo will use executable $QEMU DIR=`dirname $0` [ -z "$DIR" -o "$DIR" == "." ] && DIR=`pwd` echo DIR is $DIR PREV_RTC_FREQ=`cat /proc/sys/dev/rtc/max-user-freq` [ "$PREV_RTC_FREQ" -ge "1024" ] || echo 'WARN: RTC FREQ too slow:' $PREV_RTC_FREQ sudo $QEMU -net nic,model=rtl8139,macaddr=52:54:00:80:80:01 -net tap,script=$DIR/qemu-ifup-br0,downscript=$DIR/qemu-ifdown-br0 -localtime -cdrom /distrib/knoppix/KNOPPIX_V5.1.0CD-2006-12-30-EN.iso -m 384 -pidfile $DIR/virt1-knoppix.pid -smp 1 -no-kqemu -clock rtc -vnc :9 == $ cat qemu-ifup-br0 == #!/bin/sh echo Configuring virtual interface $1 if [ "$UID" -eq "0" ] then BRIF=br0 if brctl addif $BRIF $1 then echo $1 added to $BRIF ifconfig $1 0.0.0.0 up echo $1 configured for bridge $BRIF else IP_LOCAL=169.254.1.1 echo $1 not added to $BRIF ifconfig $1 $IP_LOCAL up echo $1 configured to $IP_LOCAL \(like autoip\) # TODO: try to make real autoip fi else echo Will sudo $0 exec sudo -p "Password for $0:" $0 $* fi == $ cat qemu-ifdown-br0 == #!/bin/sh BRIF=br0 ifconfig $1 brctl show $BRIF brctl showmacs $BRIF echo Deconfiguring virtual interface $1 will be done automatically == Bridge interface should be configured in system $ cat /etc/network/interfaces == #auto eth0 - this interface should not be configured iface eth0 inet static ... # The primary network interface - now in bridge mode auto br0 iface br0 inet static bridge_ports eth0 ... == $ cat /proc/sys/dev/rtc/max-user-freq == 4096 == $ uname -a == Linux *** 2.6.18-5-amd64 #1 SMP Sat Dec 22 20:43:59 UTC 2007 x86_64 GNU/Linux == $ cat /proc/cpuinfo == processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Pentium(R) D CPU 2.80GHz stepping : 4 cpu MHz : 2800.000 cache size : 2048 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm bogomips : 5633.18 clflush size : 64 cache_alignment : 128 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 ... == $ ~/bin/qemu-system-x86_64 QEMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard ... == May be somebody will understand what's happen :) Sergey Bychkow ICQ: 21014758 FTN: 2:450/118.55