From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/4] KVM: MMU: Make mmu_shrink() scan nr_to_scan shadow pages Date: Mon, 19 Dec 2011 11:26:44 +0200 Message-ID: <4EEF0354.4090603@redhat.com> References: <20111212072242.8aaf64a3420608b8204702c7@gmail.com> <20111212072647.1990b19483b0a482a894a0f6@gmail.com> <20111216110611.GC26982@amt.cnet> <20111216235824.a8016959785b2bd869b84a0a@gmail.com> <4EEEF92F.9020807@redhat.com> <4EEF0257.9090507@oss.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , Marcelo Tosatti , kvm@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49193 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296Ab1LSJ0v (ORCPT ); Mon, 19 Dec 2011 04:26:51 -0500 In-Reply-To: <4EEF0257.9090507@oss.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 12/19/2011 11:22 AM, Takuya Yoshikawa wrote: >> Yes, it's very conservative. But on the other hand the shrinker is >> tuned for dcache and icache, where there are usually tons of useless >> objects. If we have to free something, I'd rather free them instead of >> mmu pages which tend to get recreated soon. >> > > > OK, to satisfy the requirements, I will do: > > 1. find the guest with the highest (shadow pages / memory) ratio How do you propose to do that efficiently? We may have hundreds of guests, or even more, on one host. Each guest access will involve bouncing a few cache lines. > 2. just zap one page from that guest, keeping the current > conservative rate > > I will update the patch. I think the current rate is too conservative. No idea what a good one is, I don't have a feeling as to the relation between shrinker callbacks and memory pressure. -- error compiling committee.c: too many arguments to function