From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 0/8] KVM: Reduce mmu_lock hold time when zapping mmu pages Date: Mon, 4 Feb 2013 11:42:36 -0200 Message-ID: <20130204134235.GB9005@amt.cnet> References: <20130123191231.d66489d2.yoshikawa_takuya_b1@lab.ntt.co.jp> <50FFBF24.3000203@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Takuya Yoshikawa , gleb@redhat.com, kvm@vger.kernel.org To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27079 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752350Ab3BDNuf (ORCPT ); Mon, 4 Feb 2013 08:50:35 -0500 Content-Disposition: inline In-Reply-To: <50FFBF24.3000203@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jan 23, 2013 at 06:44:52PM +0800, Xiao Guangrong wrote: > On 01/23/2013 06:12 PM, Takuya Yoshikawa wrote: > > This patch set mitigates another mmu_lock hold time issue. Although > > this is not enough and I'm thinking of additional work already, this > > alone can reduce the lock hold time to some extent. > > > > It is not worth doing this kind of complex thing, usually, only a few pages on > the invalid list. I think its a good idea - memory freeing can be done outside mmu_lock protection (as long as its bounded). It reduces mmu_lock contention overall. > The *really* heavily case is kvm_mmu_zap_all() which can be speeded > up by using generation number, this is a todo work in kvm wiki: > > http://www.linux-kvm.org/page/TODO: O(1) mmu invalidation using a generation number > > I am doing this work for some weeks and will post the patch out during these days. Can you describe the generation number scheme in more detail, please?