Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755492AbbDXHzq (ORCPT ); Fri, 24 Apr 2015 03:55:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47602 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755431AbbDXHzm (ORCPT ); Fri, 24 Apr 2015 03:55:42 -0400 Message-ID: <5539F6EC.6080604@redhat.com> Date: Fri, 24 Apr 2015 09:55:24 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "Zhang, Yang Z" , "H. Peter Anvin" , "Hansen, Dave" , "Li, Liang Z" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "gleb@kernel.org" , "mtosatti@redhat.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "x86@kernel.org" , "joro@8bytes.org" , "Hao, Xudong" Subject: Re: [v6] kvm/fpu: Enable fully eager restore kvm FPU References: <1429823583-3226-1-git-send-email-liang.z.li@intel.com> <55390F9A.2070808@intel.com> <553955D9.3030600@zytor.com> <5539F45D.6020400@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1007 Lines: 24 On 24/04/2015 09:46, Zhang, Yang Z wrote: > > On the other hand vmexit is lighter and lighter on newer processors; a > > Sandy Bridge has less than half the vmexit cost of a Core 2 (IIRC 1000 > > vs. 2500 clock cycles approximately). > > 1000 cycles? I remember it takes about 4000 cycle even in HSW server. I was going from memory, but I now measured it with the vmexit test of kvm-unit-tests. With both SNB Xeon E5 and IVB Core i7, returns about 1400 clock cycles for a vmcall exit. This includes the overhead of doing the cpuid itself. Thus the vmexit cost is around 1300 cycles. Of this the vmresume instruction is probably around 800 cycles, and the rest is introduced by KVM. There are at least 4-5 memory barriers and locked instructions. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/