From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/3] Add a vcpu_migrated statistic Date: Sat, 03 Mar 2007 10:58:04 +0200 Message-ID: <45E9389C.3000702@qumranet.com> References: <45E853A0.3080207@refactor.fi> <45E8567C.6080704@refactor.fi> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Leonard Norrgard Return-path: In-Reply-To: <45E8567C.6080704-g2GXA8XeJSExHbG02/KK1g@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Leonard Norrgard wrote: > The previous patch introduces an IPI on every vcpu migration on SMP > machines to find out the TSC value on the previous cpu. We might be > able to avoid this IPI on systems that have a synchronized TSC by > checking for it in svm/vmx_vcpu_load: > > + /* If this isn't the first vcpu_load and if the TSC > + doesn't run at a constant rate, we must handle TSC > + offsets. */ > + if (vcpu->cpu != -1 > + && !boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) { > > Wether this is actually reliable and working in the intended way is > not know yet. Reading the documentation for X86_FEATURE_CONSTANT_TSC, I'm not sure either. > In the meantime, introduce a statistic for vcpu > migration, so we get some decision support for the needs for such an > optimization. > > The statistic is great (vcpu migrations are very expensive, we should know when they happen), but why two unrelated changes in a patch? I think you can drop the constant tsc optimization for now, given we aren't certain it works as we expect. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV