From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: [PATCH 2/3] KVM: use kvm_release_page_clean to guest page
Date: Mon, 23 Jul 2012 22:06:21 +0800 [thread overview]
Message-ID: <500D5A5D.8080703@linux.vnet.ibm.com> (raw)
In-Reply-To: <500D5A1E.6000704@linux.vnet.ibm.com>
In kvm_async_pf_wakeup_all, it uses bad_page to generate broadcast wakeup,
and use put_page to release the page, the work depends on bad_page is the
normal page. But we will use the error code instead of bad_page, so use
kvm_release_page_clean to release the page which will release the error
code probably
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
---
virt/kvm/async_pf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index 74268b4..ebae24b 100644
--- a/virt/kvm/async_pf.c
+++ b/virt/kvm/async_pf.c
@@ -112,7 +112,7 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu)
typeof(*work), link);
list_del(&work->link);
if (work->page)
- put_page(work->page);
+ kvm_release_page_clean(work->page);
kmem_cache_free(async_pf_cache, work);
}
spin_unlock(&vcpu->async_pf.lock);
@@ -139,7 +139,7 @@ void kvm_check_async_pf_completion(struct kvm_vcpu *vcpu)
list_del(&work->queue);
vcpu->async_pf.queued--;
if (work->page)
- put_page(work->page);
+ kvm_release_page_clean(work->page);
kmem_cache_free(async_pf_cache, work);
}
}
--
1.7.7.6
next prev parent reply other threads:[~2012-07-23 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 14:03 [PATCH 0/3] KVM: remove dummy pages Xiao Guangrong
2012-07-23 14:05 ` [PATCH 1/3] KVM: MMU: using kvm_release_pfn_clean to release pfn Xiao Guangrong
2012-07-23 14:06 ` Xiao Guangrong [this message]
2012-07-23 14:07 ` [PATCH 3/3] KVM: remove dummy pages Xiao Guangrong
2012-07-24 2:13 ` [PATCH 0/3] " Xiao Guangrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=500D5A5D.8080703@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.