All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org, takuya.yoshikawa@gmail.com
Subject: Re: [PATCH-v2 0/4] KVM: dirty logging optimization
Date: Mon, 22 Nov 2010 14:59:36 +0900	[thread overview]
Message-ID: <4CEA06C8.1020801@oss.ntt.co.jp> (raw)
In-Reply-To: <20101122144055.f5e36522.yoshikawa.takuya@oss.ntt.co.jp>

(2010/11/22 14:40), Takuya Yoshikawa wrote:
> Hi,
>
> I updated my patch set with your comments reflected.

Changelog:
   - used enum
   - lpage_idx issues
   - function names
   - measurements


>
>   - [PATCH 1/4] KVM: fix race condition in kvm_mmu_slot_remove_write_access()
>   - [PATCH 2/4] KVM: introduce helper to access lpage_info
>   - [PATCH 3/4] KVM: count the number of dirty pages for each memslot
>   - [RFC PATCH 4/4] KVM: selective write protection using dirty bitmap
>
> The first one is a small fix and maybe worth applying seperately.
>
> The second and third are preparation for the last one, but I believe
> each has its own value.
>
>
> I measured the time consumed by kvm_mmu_slot_remove_write_access[_mask]()
> to decide at which conditions we choose *_mask(). Please check below!
>
>   * I implemented dirty_level_memslot() based on these results.
>     See [PATCH 4]
>
>
>
> Is it possible to apply [PATCH 1 and 2] first?
> It will help me a lot to concentrate on the main part.
>
>
>    Takuya
>
> ===
> Test
>
>   - On core 2 duo machine (without EPT)
>      =>  just because there was already test environment.
>   - 1GB RAM for the guest
>   - Workloads:
>     x11perf for frame buffer test
>     "find /" loop for live-migration test
>
>   - Time was measured by rdtscll
>     kvm mask: our method
>     kvm orig: original method
>
>
> a) Frame buffer
> ---------------------------------------------------------------
>
> kernel: [ 5584.954209] kvm: nr_dirty_pages/npages = 8/4096
> kernel: [ 5584.954240] kvm mask: time(tsc) = 9485
>
> kernel: [ 5992.185125] kvm: nr_dirty_pages/npages = 7/4096
> kernel: [ 5992.185389] kvm orig: time(tsc) = 444724
>
> 45 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5588.330585] kvm: nr_dirty_pages/npages = 80/4096
> kernel: [ 5588.330623] kvm mask: time(tsc) = 16688
>
> kernel: [ 5996.183982] kvm: nr_dirty_pages/npages = 80/4096
> kernel: [ 5996.184275] kvm orig: time(tsc) = 495551
>
> 30 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5578.156641] kvm: nr_dirty_pages/npages = 195/4096
> kernel: [ 5578.156690] kvm mask: time(tsc) = 27335
>
> kernel: [ 5985.109688] kvm: nr_dirty_pages/npages = 195/4096
> kernel: [ 5985.109820] kvm orig: time(tsc) = 194530
>
> 7 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5605.821017] kvm: nr_dirty_pages/npages = 375/4096
> kernel: [ 5605.821077] kvm mask: time(tsc) = 35049
>
> kernel: [ 6014.627767] kvm: nr_dirty_pages/npages = 375/4096
> kernel: [ 6014.628190] kvm orig: time(tsc) = 702737
>
> 20 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5573.551459] kvm: nr_dirty_pages/npages = 576/4096
> kernel: [ 5573.551532] kvm mask: time(tsc) = 46718
>
> kernel: [ 5981.486862] kvm: nr_dirty_pages/npages = 576/4096
> kernel: [ 5981.487036] kvm orig: time(tsc) = 210385
>
> 5 times faster
>
> ---------------------------------------------------------------
>
>
>
> b) Live-migration (1GB RAM)
> ---------------------------------------------------------------
>
> kernel: [ 5011.599573] kvm: nr_dirty_pages/npages = 52/261888
> kernel: [ 5011.599624] kvm mask: time(tsc) = 33712
>
> kernel: [ 4297.465401] kvm: nr_dirty_pages/npages = 50/261888
> kernel: [ 4297.465918] kvm orig: time(tsc) = 894593
>
> 25 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5009.045842] kvm: nr_dirty_pages/npages = 120/261888
> kernel: [ 5009.045940] kvm mask: time(tsc) = 50575
>
> kernel: [ 4295.438092] kvm: nr_dirty_pages/npages = 106/261888
> kernel: [ 4295.438427] kvm orig: time(tsc) = 525140
>
> 10 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5016.914031] kvm: nr_dirty_pages/npages = 251/261888
> kernel: [ 5016.914160] kvm mask: time(tsc) = 78750
>
> kernel: [ 4297.265937] kvm: nr_dirty_pages/npages = 260/261888
> kernel: [ 4297.266411] kvm orig: time(tsc) = 782446
>
> 10 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5015.717535] kvm: nr_dirty_pages/npages = 526/261888
> kernel: [ 5015.717697] kvm mask: time(tsc) = 130137
>
> kernel: [ 4295.370101] kvm: nr_dirty_pages/npages = 596/261888
> kernel: [ 4295.370589] kvm orig: time(tsc) = 644805
>
> 5 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5011.693010] kvm: nr_dirty_pages/npages = 1029/261888
> kernel: [ 5011.693177] kvm mask: time(tsc) = 219863
>
> kernel: [ 4295.760635] kvm: nr_dirty_pages/npages = 1025/261888
> kernel: [ 4295.761078] kvm orig: time(tsc) = 767333
>
> 3 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5014.805403] kvm: nr_dirty_pages/npages = 2219/261888
> kernel: [ 5014.805676] kvm mask: time(tsc) = 454314
>
> kernel: [ 4302.186712] kvm: nr_dirty_pages/npages = 1982/261888
> kernel: [ 4302.191418] kvm orig: time(tsc) = 2294187
>
> 5 times faster
>
> ---------------------------------------------------------------
>
> kernel: [ 5015.305794] kvm: nr_dirty_pages/npages = 4143/261888
> kernel: [ 5015.306291] kvm mask: time(tsc) = 847175
>
> kernel: [ 4302.068376] kvm: nr_dirty_pages/npages = 3835/261888
> kernel: [ 4302.069456] kvm orig: time(tsc) = 1855105
>
> 3 times faster
>
> ---------------------------------------------------------------
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2010-11-22  5:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22  5:40 [PATCH-v2 0/4] KVM: dirty logging optimization Takuya Yoshikawa
2010-11-22  5:42 ` [PATCH 1/4] KVM: fix race condition in kvm_mmu_slot_remove_write_access() Takuya Yoshikawa
2010-11-22  5:42 ` [PATCH 2/4] KVM: introduce helper to access lpage_info Takuya Yoshikawa
2010-11-22  5:43 ` [PATCH 3/4] KVM: count the number of dirty pages for each memslot Takuya Yoshikawa
2010-11-22  5:45 ` [RFC PATCH 4/4] KVM: selective write protection using dirty bitmap Takuya Yoshikawa
2010-11-22  5:59 ` Takuya Yoshikawa [this message]
2010-11-25  9:48 ` [PATCH-v2 0/4] KVM: dirty logging optimization Takuya Yoshikawa

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=4CEA06C8.1020801@oss.ntt.co.jp \
    --to=yoshikawa.takuya@oss.ntt.co.jp \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=takuya.yoshikawa@gmail.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.