Skip to content

KVM: MMU: Optimize guest page table walk

Takuya Yoshikawa kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 16 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1KVM: MMU: Optimize guest page table walkarch/x86/kvm/paging_tmpl.h+20 -316 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/1 v2] KVM: MMU: Optimize guest page table walk

Changelog v1->v2: dropped slot_hint and wrapper.

As Avi said, get_user() alone achieved most of the improvement.

Before

  2.994 us   |  paging64_walk_addr_generic();
  1.480 us   |  paging64_walk_addr_generic();
  0.996 us   |  paging64_walk_addr_generic();
  1.108 us   |  paging64_walk_addr_generic();
  0.962 us   |  paging64_walk_addr_generic();
  2.063 us   |  paging64_walk_addr_generic();
  1.379 us   |  paging64_walk_addr_generic();
  0.962 us   |  paging64_walk_addr_generic();
  1.085 us   |  paging64_walk_addr_generic();
  2.965 us   |  paging64_walk_addr_generic();

After

  2.264 us   |  paging64_walk_addr_generic();
  1.079 us   |  paging64_walk_addr_generic();
  0.648 us   |  paging64_walk_addr_generic();
  0.703 us   |  paging64_walk_addr_generic();
  0.635 us   |  paging64_walk_addr_generic();
  0.869 us   |  paging64_walk_addr_generic();
  0.529 us   |  paging64_walk_addr_generic();
  0.702 us   |  paging64_walk_addr_generic();
  0.529 us   |  paging64_walk_addr_generic();
  0.691 us   |  paging64_walk_addr_generic();

A little surprise was that the original version itself was a bit fater than before.

But I tested this with today's latest kvm.git and some parts had been changed, so it could be.

Anyway, this patch improves by some degree!

Takuya