From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1 Date: Wed, 16 Jan 2013 17:07:57 -0200 Message-ID: <20130116190757.GA28986@amt.cnet> References: <20130111182518.6c5975d9.yoshikawa_takuya_b1@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gleb@redhat.com, kvm@vger.kernel.org, Xiao Guangrong To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65457 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755526Ab3APTIU (ORCPT ); Wed, 16 Jan 2013 14:08:20 -0500 Content-Disposition: inline In-Reply-To: <20130111182518.6c5975d9.yoshikawa_takuya_b1@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jan 11, 2013 at 06:25:18PM +0900, Takuya Yoshikawa wrote: > Patches 1 to 3 are trivial. > > Patch 4 is the main cause of the increased lines, but I think the new > code makes it easier to understand why each condition in > __kvm_set_memory_region() is there. > > If you don't agree with patch 4, please consider taking the rest of the > series at this time. > > Takuya Yoshikawa (4): > KVM: set_memory_region: Don't jump to out_free unnecessarily > KVM: set_memory_region: Don't check for overlaps unless we create or move a slot > KVM: set_memory_region: Remove unnecessary variable memslot > KVM: set_memory_region: Identify the requested change explicitly > > virt/kvm/kvm_main.c | 94 ++++++++++++++++++++++++++++++++------------------- > 1 files changed, 59 insertions(+), 35 deletions(-) > > -- > 1.7.5.4 Reviewed-by: Marcelo Tosatti BTW, while at it, its probably worthwhile to restrict flags modifications: change from flags = 0 to flags = read-only is incomplete. Xiao, should it be allowed only during creation?