From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v3 07/15] KVM: MMU: introduce invalid rmap handlers Date: Wed, 17 Apr 2013 20:38:10 -0300 Message-ID: <20130417233810.GD31059@amt.cnet> References: <1366093973-2617-1-git-send-email-xiaoguangrong@linux.vnet.ibm.com> <1366093973-2617-8-git-send-email-xiaoguangrong@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gleb@redhat.com, avi.kivity@gmail.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56317 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932893Ab3DQXia (ORCPT ); Wed, 17 Apr 2013 19:38:30 -0400 Content-Disposition: inline In-Reply-To: <1366093973-2617-8-git-send-email-xiaoguangrong@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Apr 16, 2013 at 02:32:45PM +0800, Xiao Guangrong wrote: > Invalid rmaps is the rmap of the invalid memslot which is being > deleted, especially, we can treat all rmaps are invalid when > kvm is being destroyed since all memslot will be deleted soon. > MMU should remove all sptes on these rmaps before the invalid > memslot fully deleted > > The reason why we separately handle invalid rmap is we want to > unmap invalid-rmap out of mmu-lock to achieve scale performance > on intensive memory and vcpu used guest Better try to make the code simpler, and introduce complexity only if necessary. The idea to zap the roots is very elegant and apparently effective. What are its problems?