From: Avi Kivity <avi@redhat.com>
To: Izik Eidus <ieidus@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity
Date: Thu, 11 Jun 2009 12:33:17 +0300 [thread overview]
Message-ID: <4A30CF5D.4010701@redhat.com> (raw)
In-Reply-To: <1244651005-18322-3-git-send-email-ieidus@redhat.com>
Izik Eidus wrote:
> change the dirty page tracking to work with dirty bity instead of page fault.
> right now the dirty page tracking work with the help of page faults, when we
> want to track a page for being dirty, we write protect it and we mark it dirty
> when we have write page fault, this code move into looking at the dirty bit
> of the spte.
>
>
I'm concerned about performance during the later stages of live
migration. Even if only 1000 pages are dirty, you still have to look at
2,000,000 or more ptes (for an 8GB guest). That's a lot of overhead.
I think we need to use the page table hierarchy, write protect the upper
page table so we know which page tables we need to look at.
> +int is_dirty_and_clean_rmapp(struct kvm *kvm, unsigned long *rmapp)
> +{
> + u64 *spte;
> + int dirty = 0;
> +
> + if (!shadow_dirty_mask)
> + return 0;
> +
> + spte = rmap_next(kvm, rmapp, NULL);
> + while (spte) {
> + if (*spte & PT_DIRTY_MASK) {
> + set_shadow_pte(spte, (*spte &= ~PT_DIRTY_MASK) |
> + SPTE_DONT_DIRTY);
>
Keep using shadow_dirty_mask here for consistency.
> kvm_flush_remote_tlbs(kvm);
> + for (i = 0; i < PT64_ENT_PER_PAGE; ++i) {
> + if (sp->spt[i] & PT_DIRTY_MASK)
> + mark_page_dirty(kvm, sp->gfns[i]);
> + }
>
shadow_dirty_mask.
> @@ -2785,6 +2790,8 @@ static struct kvm_x86_ops svm_x86_ops = {
> .set_tss_addr = svm_set_tss_addr,
> .get_tdp_level = get_npt_level,
> .get_mt_mask = svm_get_mt_mask,
> +
> + .dirty_bit_support = svm_dirty_bit_support,
> };
>
Just use shadow_dirty_mask != 0.
>
> +static int vmx_dirty_bit_support(void)
> +{
> + return false;
> +}
>
It's false only when ept is enabled.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-06-11 9:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-10 16:23 [PATCH 0/2] RFC use dirty bit for page dirty tracking (v2) Izik Eidus
2009-06-10 16:23 ` [PATCH 1/2] kvm: fix dirty bit tracking for slots with large pages Izik Eidus
2009-06-10 16:23 ` [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity Izik Eidus
2009-06-10 17:00 ` Izik Eidus
2009-06-10 20:42 ` Marcelo Tosatti
2009-06-10 23:57 ` Izik Eidus
2009-06-10 23:59 ` Izik Eidus
2009-06-11 1:04 ` Marcelo Tosatti
2009-06-11 11:27 ` Izik Eidus
2009-06-11 12:24 ` Marcelo Tosatti
2009-06-11 15:49 ` Izik Eidus
2009-06-11 8:24 ` Ulrich Drepper
2009-06-11 9:44 ` Izik Eidus
2009-06-11 9:33 ` Avi Kivity [this message]
2009-06-11 9:48 ` Izik Eidus
2009-06-11 9:53 ` Avi Kivity
2009-06-14 11:10 ` [PATCH 1/2] kvm: fix dirty bit tracking for slots with large pages Avi Kivity
2009-06-15 14:58 ` [PATCH 0/2] RFC use dirty bit for page dirty tracking (v2) Ryan Harper
2009-06-15 15:19 ` Avi Kivity
2009-07-07 3:32 ` Ryan Harper
2009-07-07 5:11 ` Avi Kivity
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=4A30CF5D.4010701@redhat.com \
--to=avi@redhat.com \
--cc=ieidus@redhat.com \
--cc=kvm@vger.kernel.org \
/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.