From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Richard W.M. Jones" Subject: Re: [PATCHv5 0/4] improve speed of "rep ins" emulation Date: Mon, 13 Aug 2012 15:39:05 +0100 Message-ID: <20120813143905.GA13806@rhmail.home.annexia.org> References: <1343659101-24877-1-git-send-email-gleb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com, mtosatti@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6385 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144Ab2HMOjJ (ORCPT ); Mon, 13 Aug 2012 10:39:09 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7DEd9Zu028054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 10:39:09 -0400 Content-Disposition: inline In-Reply-To: <1343659101-24877-1-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 30, 2012 at 05:38:17PM +0300, Gleb Natapov wrote: > And now for something completely different. > > So this series (or rather the last patch of it) takes different approach > to "rep ins" optimization. Instead of writing separate fast path for > it do the fast path inside emulator itself. This way nobody can say the > code is not reused! > > Patch 1,2 are now, strictly speaking, not needed, but I think this is still > nice cleanup and, in case of patch 1, eliminates some ifs at each KVM_RUN ioctl. > > Gleb Natapov (4): > Provide userspace IO exit completion callback. > KVM: emulator: make x86 emulation modes enum instead of defines > KVM: emulator: string_addr_inc() cleanup > KVM: emulator: optimize "rep ins" handling. > > arch/x86/include/asm/kvm_emulate.h | 26 +++++----- > arch/x86/include/asm/kvm_host.h | 1 + > arch/x86/kvm/emulate.c | 48 ++++++++++++++----- > arch/x86/kvm/x86.c | 92 +++++++++++++++++++++--------------- > 4 files changed, 104 insertions(+), 63 deletions(-) I tested this patch series and it really helped to improve the performance of loading the libguestfs -kernel and -initrd: https://bugzilla.redhat.com/show_bug.cgi?id=847546 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v