From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: emulator: do not needlesly sync registers from emulator ctxt to vcpu Date: Wed, 30 Mar 2011 15:46:58 +0200 Message-ID: <4D933452.5020108@redhat.com> References: <20110330104727.GS7766@redhat.com> <4D930B0D.4090809@redhat.com> <20110330112243.GV7766@redhat.com> <20110330114333.GW7766@redhat.com> <4D931F73.90704@redhat.com> <20110330124828.GX7766@redhat.com> <20110330132618.GY7766@redhat.com> <4D93301E.3080200@redhat.com> <20110330133613.GZ7766@redhat.com> <4D9332F5.1060208@redhat.com> <20110330134350.GA7766@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755941Ab1C3NrC (ORCPT ); Wed, 30 Mar 2011 09:47:02 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2UDl1Td001412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Mar 2011 09:47:01 -0400 In-Reply-To: <20110330134350.GA7766@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/30/2011 03:43 PM, Gleb Natapov wrote: > On Wed, Mar 30, 2011 at 03:41:09PM +0200, Avi Kivity wrote: > > On 03/30/2011 03:36 PM, Gleb Natapov wrote: > > >> > > >> It's wierd. Do you get perf hits in the copying? > > >> > > >How can I check. The memcpy is inlined. > > > > > > > perf annotate x86_emulate_instruction > > > > (newer perf allows you to get there interactively from 'perf report') > > > > >> Copying a couple of hot cache lines shouldn't take any measurable > Ah, forgot about it: > > First one: > 27.71 : 1179f: f3 a5 rep movsl %ds:(%rsi),%es:(%rdi) > > Second one: > 32.68 : 11888: f3 a5 rep movsl %ds:(%rsi),%es:(%rdi) > Okay, I'm convinced. (looks like a missed optimization, should use rep movsq there) -- error compiling committee.c: too many arguments to function