mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: avi@redhat.com, mtosatti@redhat.com, paulus@samba.org,
	aarcange@redhat.com, kvm@vger.kernel.org,
	kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org,
	takuya.yoshikawa@gmail.com
Subject: Re: [PATCH 0/6] KVM: Optimize MMU notifier's THP page invalidation -v2
Date: Thu, 21 Jun 2012 14:51:24 +0200	[thread overview]
Message-ID: <A0FD0800-A240-488E-932F-65044465324C@suse.de> (raw)
In-Reply-To: <20120621174842.22779780.yoshikawa.takuya@oss.ntt.co.jp>


On 21.06.2012, at 10:48, Takuya Yoshikawa wrote:

> I added further optimization based on Avi's advice and my rmap_pde work.
> - patch [5-6]
> 
> The new test result was impressively good, see below, and THP page
> invalidation was more than 5 times faster on my x86 machine.
> 
> I also noticed that GUI's responsiveness on the host during swapping the
> guest's memory improved a lot.
> 
> Before:
>  ...
>  19.852 us  |  __mmu_notifier_invalidate_range_start();
>  28.033 us  |  __mmu_notifier_invalidate_range_start();
>  19.066 us  |  __mmu_notifier_invalidate_range_start();
>  44.715 us  |  __mmu_notifier_invalidate_range_start();
>  31.613 us  |  __mmu_notifier_invalidate_range_start();
>  20.659 us  |  __mmu_notifier_invalidate_range_start();
>  19.979 us  |  __mmu_notifier_invalidate_range_start();
>  20.416 us  |  __mmu_notifier_invalidate_range_start();
>  20.632 us  |  __mmu_notifier_invalidate_range_start();
>  22.316 us  |  __mmu_notifier_invalidate_range_start();
>  ...
> 
> After:
>  ...
>  4.089 us   |  __mmu_notifier_invalidate_range_start();
>  4.096 us   |  __mmu_notifier_invalidate_range_start();
>  3.560 us   |  __mmu_notifier_invalidate_range_start();
>  3.376 us   |  __mmu_notifier_invalidate_range_start();
>  3.772 us   |  __mmu_notifier_invalidate_range_start();
>  3.353 us   |  __mmu_notifier_invalidate_range_start();
>  3.332 us   |  __mmu_notifier_invalidate_range_start();
>  3.332 us   |  __mmu_notifier_invalidate_range_start();
>  3.332 us   |  __mmu_notifier_invalidate_range_start();
>  3.337 us   |  __mmu_notifier_invalidate_range_start();
>  ...
> 
> Takuya Yoshikawa (6):
>  KVM: MMU: Use __gfn_to_rmap() to clean up kvm_handle_hva()
>  KVM: Introduce hva_to_gfn_memslot() for kvm_handle_hva()
>  KVM: MMU: Make kvm_handle_hva() handle range of addresses
>  KVM: Introduce kvm_unmap_hva_range() for kvm_mmu_notifier_invalidate_range_start()
>  KVM: Separate rmap_pde from kvm_lpage_info->write_count
>  KVM: MMU: Avoid handling same rmap_pde in kvm_handle_hva_range()
> 
> arch/powerpc/include/asm/kvm_host.h |    2 +
> arch/powerpc/kvm/book3s_64_mmu_hv.c |   42 +++++++++++++++-----
> arch/x86/include/asm/kvm_host.h     |    3 +-
> arch/x86/kvm/mmu.c                  |   72 +++++++++++++++++++++++------------
> arch/x86/kvm/x86.c                  |   13 ++++++-
> include/linux/kvm_host.h            |    8 ++++
> virt/kvm/kvm_main.c                 |    3 +-
> 7 files changed, 104 insertions(+), 39 deletions(-)

Paulus, please review the book3s_hv parts more closely. I didn't spot anything obviously wrong, but rmap magic is still slightly puzzling to me, so me reviewing there doesn't mean much :).


Alex


      parent reply	other threads:[~2012-06-21 12:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21  8:48 Takuya Yoshikawa
2012-06-21  8:49 ` [PATCH 1/6] KVM: MMU: Use __gfn_to_rmap() to clean up kvm_handle_hva() Takuya Yoshikawa
2012-06-21  8:49 ` [PATCH 2/6] KVM: Introduce hva_to_gfn_memslot() for kvm_handle_hva() Takuya Yoshikawa
2012-06-21  8:50 ` [PATCH 3/6] KVM: MMU: Make kvm_handle_hva() handle range of addresses Takuya Yoshikawa
2012-06-21  8:51 ` [PATCH 4/6] KVM: Introduce kvm_unmap_hva_range() for kvm_mmu_notifier_invalidate_range_start() Takuya Yoshikawa
2012-06-21  8:51 ` [PATCH 5/6] KVM: Separate rmap_pde from kvm_lpage_info->write_count Takuya Yoshikawa
2012-06-21  8:52 ` [PATCH 6/6] KVM: MMU: Avoid handling same rmap_pde in kvm_handle_hva_range() Takuya Yoshikawa
2012-06-22 14:33   ` Takuya Yoshikawa
2012-06-21 12:51 ` Alexander Graf [this message]

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=A0FD0800-A240-488E-932F-65044465324C@suse.de \
    --to=agraf@suse.de \
    --cc=aarcange@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=paulus@samba.org \
    --cc=takuya.yoshikawa@gmail.com \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /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

all inboxes | Powered by JetHome®