From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended Date: Thu, 5 Jul 2012 23:05:46 +0900 Message-ID: <20120705230546.ed314f3d83b5f727492db2f1@gmail.com> References: <20120705195607.2e940693.yoshikawa.takuya@oss.ntt.co.jp> <20120705114959.GD15459@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mail-gh0-f174.google.com ([209.85.160.174]:53659 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194Ab2GEOFw (ORCPT ); Thu, 5 Jul 2012 10:05:52 -0400 Received: by ghrr11 with SMTP id r11so7408920ghr.19 for ; Thu, 05 Jul 2012 07:05:51 -0700 (PDT) In-Reply-To: <20120705114959.GD15459@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 5 Jul 2012 14:50:00 +0300 Gleb Natapov wrote: > > Note that "if (!nr_to_scan--)" check is removed since we do not try to > > free mmu pages from more than one VM. > > > IIRC this was proposed in the past that we should iterate over vm list > until freeing something eventually, but Avi was against it. I think the > probability of a VM with kvm->arch.n_used_mmu_pages == 0 is low, so > it looks OK to drop nr_to_scan to me. Since our batch size is 128, the minimum positive @nr_to_scan, it's almost impossible to see the effect of the check. Thanks, Takuya