kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Support for GB pages in KVM
@ 2009-03-27 14:31 Joerg Roedel
  2009-03-27 14:31 ` [PATCH 1/7] hugetlb: export vma_kernel_pagesize to modules Joerg Roedel
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Joerg Roedel @ 2009-03-27 14:31 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, linux-kernel

Hi,

this patchset extends the KVM MMU implementation to support 1GB pages as
supported by AMD family 16 processors. These patches enable support for
1 GB pages with Nested Paging. Support for these pages in the shadow
paging code was also developed but does not run stable yet. The patch
for shadow-paging support is not included in this series and will be
sent out seperatly.

Joerg

git diff --stat avi/master..

 arch/ia64/kvm/process.c         |    5 -
 arch/ia64/kvm/vmm_ivt.S         |   18 ++--
 arch/ia64/kvm/vtlb.c            |    3 +-
 arch/x86/include/asm/kvm_host.h |   29 ++++-
 arch/x86/kvm/mmu.c              |  232 +++++++++++++++++++++++++++------------
 arch/x86/kvm/paging_tmpl.h      |   48 ++++++---
 arch/x86/kvm/svm.c              |    7 +
 arch/x86/kvm/vmx.c              |   19 ++-
 arch/x86/kvm/x86.c              |    6 +-
 include/linux/kvm.h             |    1 +
 include/linux/kvm_host.h        |    2 +-
 mm/hugetlb.c                    |    1 +
 virt/kvm/kvm_main.c             |   26 +++++




^ permalink raw reply	[flat|nested] 30+ messages in thread
* [PATCH 0/7] KVM support for 1GB pages v2
@ 2009-04-24 11:58 Joerg Roedel
  2009-04-24 11:58 ` [PATCH 7/7] kvm x86: report 1GB page support to userspace Joerg Roedel
  0 siblings, 1 reply; 30+ messages in thread
From: Joerg Roedel @ 2009-04-24 11:58 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-kernel, kvm

Hi,

this is the second version of the patches implementing support for 1GB
pages in KVM. There are too many changes to the first version to mention
them all here. The core support was rewritten to work with mapping
levels instead of page sizes. This was the main part of the change.
The patches still only support KVM with nested paging enabled.
All patches apply to avi/master and can be pulled from

	git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-kvm.git kvm-gb-pages

Here is the complete diffstat:

 arch/ia64/include/asm/kvm_host.h    |    3 +-
 arch/powerpc/include/asm/kvm_host.h |    3 +-
 arch/x86/include/asm/kvm_host.h     |   16 ++-
 arch/x86/kvm/mmu.c                  |  213 +++++++++++++++++++++-------------
 arch/x86/kvm/paging_tmpl.h          |   11 +-
 arch/x86/kvm/svm.c                  |    7 +
 arch/x86/kvm/vmx.c                  |    7 +
 arch/x86/kvm/x86.c                  |    6 +-
 include/linux/kvm.h                 |    1 +
 include/linux/kvm_host.h            |    2 +-
 mm/hugetlb.c                        |    1 +
 virt/kvm/kvm_main.c                 |   46 +++++---
 12 files changed, 204 insertions(+), 112 deletions(-)

Please give these patches a good review :)

Thanks,

	Joerg



^ permalink raw reply	[flat|nested] 30+ messages in thread
* [PATCH 0/7 v5] KVM: support for 1gb pages
@ 2009-07-27 14:30 Joerg Roedel
  2009-07-27 14:30 ` [PATCH 7/7] kvm x86: report 1GB page support to userspace Joerg Roedel
  0 siblings, 1 reply; 30+ messages in thread
From: Joerg Roedel @ 2009-07-27 14:30 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-kernel, kvm

Hello,

this is the latest version of the changes to KVM MMU code to support 1gb
pages.  Pages with a size of 1gb are a feature of all Fam10h AMD CPUs
and this patch set makes them available for guests and allows to map the
nested page table with 1gb pages.

Changes to the previous version of this patch set:

	* fixed a bug in the pte reserved bit checking code which
	  disallowed 1gb ptes (thanks Marcelo)
	* included a working version of 1gb page support for shadow
	  paging (again, thanks to Marcelo who found the bug in the
	  original patch)
	* rebased patches to the latest avi/master branch

I also gathered some new performance data for this code. The following
table contains the data. The configrations are all named as
<1gb pages enabled in guest>-<host backing size>. The numbers below are
the average of the elapsed time of 3 kernel compiles in a guest with 3GB
memory and 4 vpcus on an Istanbul based machine. The make jobs ran with
-j8. All measurements were done with nested paging enabled.

Configuration		Elapsed Time		Percent
------------------------------------------------------------
no1gbpages-4kb		139.81			100%
no1gbpages-1gb		129.89			92.9%
  1gbpages-4kb		137.09			98.0%
  1gbpages-1gb		129.42			92.6%

the biggest benefit is gained using 1gb pages for the nested page table.
The performance improvement compared to 4kb backing size with nested
paging is between 7% and 7.5%. Using 1gb pages in a guest with a 4kb
backing size on the host gives around 2% performance improvement.

Please review and/or consider to apply these patches.

Thanks,

	Joerg

Diffstat:


 arch/x86/include/asm/kvm_host.h |    5 +-
 arch/x86/kvm/mmu.c              |  242 ++++++++++++++++++++++++---------------
 arch/x86/kvm/paging_tmpl.h      |   97 ++++++++--------
 arch/x86/kvm/svm.c              |    6 +
 arch/x86/kvm/vmx.c              |    6 +
 arch/x86/kvm/x86.c              |    3 +-
 6 files changed, 214 insertions(+), 145 deletions(-)

Shortlog:


Joerg Roedel (7):
      kvm/mmu: make rmap code aware of mapping levels
      kvm/mmu: rename is_largepage_backed to mapping_level
      kvm/mmu: make direct mapping paths aware of mapping levels
      kvm/mmu: make page walker aware of mapping levels
      kvm/mmu: shadow support for 1gb pages
      kvm/mmu: enable gbpages by increasing nr of pagesizes
      kvm x86: report 1GB page support to userspace



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2009-07-27 14:30 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 14:31 [PATCH 0/7] Support for GB pages in KVM Joerg Roedel
2009-03-27 14:31 ` [PATCH 1/7] hugetlb: export vma_kernel_pagesize to modules Joerg Roedel
2009-03-27 14:31 ` [PATCH 2/7] kvm mmu: infrastructure changes for multiple huge page support Joerg Roedel
2009-03-29 11:38   ` Avi Kivity
2009-03-27 14:31 ` [PATCH 3/7] kvm mmu: add page size parameter to rmap_remove Joerg Roedel
2009-03-27 14:31 ` [PATCH 4/7] kvm mmu: implement necessary data structures for second huge page accounting Joerg Roedel
2009-03-29 11:45   ` Avi Kivity
2009-03-29 13:03     ` Joerg Roedel
2009-03-29 13:15       ` Avi Kivity
2009-03-29 13:32         ` Joerg Roedel
2009-03-29 13:26   ` Avi Kivity
2009-03-29 13:37     ` Avi Kivity
2009-03-27 14:31 ` [PATCH 5/7] kvm mmu: add support for 1GB pages to direct mapping paths Joerg Roedel
2009-03-29 11:49   ` Avi Kivity
2009-03-27 14:31 ` [PATCH 6/7] kvm mmu: enabling 1GB pages by extending backing_size funtion Joerg Roedel
2009-03-29 11:51   ` Avi Kivity
2009-03-27 14:31 ` [PATCH 7/7] kvm x86: report 1GB page support to userspace Joerg Roedel
2009-03-29 11:54   ` Avi Kivity
2009-03-29 12:45     ` Joerg Roedel
2009-03-29 12:49       ` Avi Kivity
2009-03-29 12:54         ` Joerg Roedel
2009-03-29 13:00           ` Avi Kivity
2009-03-28 21:40 ` [PATCH 0/7] Support for GB pages in KVM Marcelo Tosatti
2009-03-28 21:49   ` Joerg Roedel
2009-03-29 12:03     ` Avi Kivity
2009-03-29 12:47       ` Joerg Roedel
2009-03-29 12:01   ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2009-04-24 11:58 [PATCH 0/7] KVM support for 1GB pages v2 Joerg Roedel
2009-04-24 11:58 ` [PATCH 7/7] kvm x86: report 1GB page support to userspace Joerg Roedel
2009-04-28 10:10   ` Avi Kivity
2009-07-27 14:30 [PATCH 0/7 v5] KVM: support for 1gb pages Joerg Roedel
2009-07-27 14:30 ` [PATCH 7/7] kvm x86: report 1GB page support to userspace Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).