From: Andrea Arcangeli <aarcange@redhat.com>
To: Izik Eidus <ieidus@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [PATCH 3/3] add support for change_pte mmu notifiers
Date: Thu, 24 Sep 2009 19:11:36 +0200 [thread overview]
Message-ID: <20090924171136.GC6864@random.random> (raw)
In-Reply-To: <1253731638-24575-4-git-send-email-ieidus@redhat.com>
On Wed, Sep 23, 2009 at 09:47:18PM +0300, Izik Eidus wrote:
> + if (need_flush)
> + kvm_flush_remote_tlbs(kvm);
need_flush can be return to kvm_mmu_notifier_change_pte to defer the
tlb flush after dropping the spin lock I think. We are forced to flush
the tlb inside spin_lock in kvm normal context because that stops the
VM from freeing the page (it hangs on the mmu_lock taken by kvm
invalidate_page/change_pte) so we can unmap tons of sptes and do a
single kvm tlb flush that covers them all (by keeping both actions
under the mmu_lock), but in mmu notifier context the pages can't be
freed from under the guest, so we can flush the tlb flushing the tlb
before making the page freeable, because both old and new page in
do_wp_page are still pinned and can't be freed and reused from under
us even if we release mmu_lock before tlb flush.
next prev parent reply other threads:[~2009-09-24 17:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 18:47 [PATCH 0/3] kvm ksm support v3 Izik Eidus
2009-09-23 18:47 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Izik Eidus
2009-09-23 18:47 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Izik Eidus
2009-09-23 18:47 ` [PATCH 3/3] add support for change_pte mmu notifiers Izik Eidus
2009-09-24 14:55 ` Marcelo Tosatti
2009-09-24 17:11 ` Andrea Arcangeli [this message]
2009-09-24 16:55 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Andrea Arcangeli
2009-09-24 14:18 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Marcelo Tosatti
2009-09-24 16:56 ` Andrea Arcangeli
2009-09-28 16:26 ` [PATCH 0/3] kvm ksm support v3 Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2009-09-23 18:25 [PATCH 0/3] ksm support for kvm v2 Izik Eidus
2009-09-23 18:25 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Izik Eidus
2009-09-23 18:25 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Izik Eidus
2009-09-23 18:25 ` [PATCH 3/3] add support for change_pte mmu notifiers Izik Eidus
2009-09-23 18:32 ` Izik Eidus
2009-09-10 16:38 [PATCH 0/3] ksm support for kvm Izik Eidus
2009-09-10 16:38 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Izik Eidus
2009-09-10 16:38 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Izik Eidus
2009-09-10 16:38 ` [PATCH 3/3] add support for change_pte mmu notifiers Izik Eidus
2009-09-11 21:24 ` Marcelo Tosatti
2009-09-12 6:41 ` Izik Eidus
2009-09-12 16:18 ` Marcelo Tosatti
2009-09-12 17:04 ` Izik Eidus
2009-09-12 16:59 ` Marcelo Tosatti
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=20090924171136.GC6864@random.random \
--to=aarcange@redhat.com \
--cc=avi@redhat.com \
--cc=ieidus@redhat.com \
--cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox