From: Takuya Yoshikawa Date: Sun, 20 May 2012 04:15:07 +0000 (+0900) Subject: KVM: Avoid wasting pages for small lpage_info arrays X-Git-Tag: v3.6-rc1~124^2~82 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1a7b32a14138f908df52d7c53b5ce3415ec6b50;p=pandora-kernel.git KVM: Avoid wasting pages for small lpage_info arrays 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(). Signed-off-by: Takuya Yoshikawa Signed-off-by: Avi Kivity --- Reading git-diff-tree failed