From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2 v2] KVM: Avoid wasting pages for small lpage_info arrays Date: Sun, 20 May 2012 17:08:45 +0300 Message-ID: <4FB8FAED.20309@redhat.com> References: <20120520131328.245153fdcc3c998feade6bc9@gmail.com> <20120520131507.e4e14532f99266deb311e6a3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754942Ab2ETOIv (ORCPT ); Sun, 20 May 2012 10:08:51 -0400 In-Reply-To: <20120520131507.e4e14532f99266deb311e6a3@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/20/2012 07:15 AM, Takuya Yoshikawa wrote: > From: Takuya Yoshikawa > > lpage_info is created for each large level even when the memory slot is > not for RAM. This means that when we add one slot for a PCI device, we > end up allocating at least KVM_NR_PAGE_SIZES - 1 pages by vmalloc(). > > To make things worse, there is an increasing number of devices which > would result in more pages being wasted this way. > > This patch mitigates this problem by using kvm_kvzalloc(). > Thanks, applied to 'queue'. -- error compiling committee.c: too many arguments to function