From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Chmielewski Subject: Re: Houston, we have May 15, 1953 (says guest when host uses cpufreq, and dies) Date: Wed, 18 Feb 2009 19:53:11 +0100 Message-ID: <499C5917.4010700@wpkg.org> References: <499C206A.5050109@wpkg.org> <20090218184611.GG25719@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx03.syneticon.net ([78.111.66.105]:34252 "EHLO mx03.syneticon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbZBRSxS (ORCPT ); Wed, 18 Feb 2009 13:53:18 -0500 In-Reply-To: <20090218184611.GG25719@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti schrieb: > On Wed, Feb 18, 2009 at 03:51:22PM +0100, Tomasz Chmielewski wrote: >> Is using cpufreq (i.e. with ondemand governor) on KVM host safe for guests? >> >> I enabled cpufreq on the host, it scaled down the host CPU (Dual-Core >> AMD Opteron(tm) Processor 2212) to 1 GHz from 2 GHz. >> >> Guest (using 1 CPU) was still showing that it has a 2 GHz CPU in >> /proc/cpuinfo (I guess this value is read only once, when booting). >> >> After about 2 hours I started "date" on the guest - it showed that it's >> year *1953*, after which I couldn't start any other command (the guest >> was technically alive - SSH connection to it didn't die - but I couldn't >> do anything). >> >> # date >> Wed Feb 18 13:07:17 CET 2009 >> >> [let's wait ~2 hours] >> >> >> # date >> Fri May 15 10:13:14 CET 1953 >> # date >> ^C^Z >> [could not interrupt] >> >> >> Is it expected behaviour? Is it correct behaviour? > > Whats the output of /proc/cpuinfo on the host? Does it contain the > constant_tsc flag? It doesn't contain this flag. /proc/cpuinfo output - below. > Whats the output of > /sys/devices/system/clocksource/clocksource0/current_clocksource > on the guest? # cat /sys/devices/system/clocksource/clocksource0/* hpet acpi_pm jiffies tsc <- available hpet <- current # cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2212 stepping : 2 cpu MHz : 2000.000 cache size : 1024 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy bogomips : 3993.20 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc processor : 1 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2212 stepping : 2 cpu MHz : 2000.000 cache size : 1024 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy bogomips : 3993.20 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc processor : 2 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2212 stepping : 2 cpu MHz : 2000.000 cache size : 1024 KB physical id : 1 siblings : 2 core id : 0 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy bogomips : 3993.20 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc processor : 3 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2212 stepping : 2 cpu MHz : 2000.000 cache size : 1024 KB physical id : 1 siblings : 2 core id : 1 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy bogomips : 3993.20 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc -- Tomasz Chmielewski http://wpkg.org