summaryrefslogtreecommitdiffstats
path: root/virt/kvm/async_pf.c
diff options
context:
space:
mode:
authorXiao Guangrong2012-07-26 05:58:59 +0200
committerAvi Kivity2012-07-26 10:55:34 +0200
commita2766325cf9f9e36d1225145f1ce1b066f001837 (patch)
treea00cefe5c199c7e4845294f38475c3abd90e9419 /virt/kvm/async_pf.c
parentKVM: use kvm_release_page_clean to release the page (diff)
downloadkernel-qcow2-linux-a2766325cf9f9e36d1225145f1ce1b066f001837.tar.gz
kernel-qcow2-linux-a2766325cf9f9e36d1225145f1ce1b066f001837.tar.xz
kernel-qcow2-linux-a2766325cf9f9e36d1225145f1ce1b066f001837.zip
KVM: remove dummy pages
Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate the error conditions Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm/async_pf.c')
-rw-r--r--virt/kvm/async_pf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index ebae24b62c90..79722782d9d7 100644
--- a/virt/kvm/async_pf.c
+++ b/virt/kvm/async_pf.c
@@ -203,8 +203,7 @@ int kvm_async_pf_wakeup_all(struct kvm_vcpu *vcpu)
if (!work)
return -ENOMEM;
- work->page = bad_page;
- get_page(bad_page);
+ work->page = get_bad_page();
INIT_LIST_HEAD(&work->queue); /* for list_del to work */
spin_lock(&vcpu->async_pf.lock);