LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Joerg Roedel" <joerg.roedel@amd.com>
To: "Avi Kivity" <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: KVM: add support for SVM Nested Paging
Date: Thu,  7 Feb 2008 13:47:37 +0100	[thread overview]
Message-ID: <1202388465-8657-1-git-send-email-joerg.roedel@amd.com> (raw)

Hi,

here is the improved patchset which adds support for the Nested Paging
feature of the AMD Barcelona and Phenom processors to KVM. The patch set
was successfully install- and runtime-tested with various guest
operating systems (64 bit, 32 bit legacy and 32 bit PAE Linux,
Windows 64 bit and 32 bit versions too).

To the previous post of these patches they were extended with support
for KVM on 32 bit PAE hosts. Live migration is also implemented and
tested in various situations (migration between 32 bit and 64 bit host,
Non-NPT to/from NPT migration, NPT to NPT migration, all with various
kinds of guests, including Windows).  After all these tests I am pretty
sure that these patches don't introduce any regression to KVM and
therefore the NPT feature is enabled per default.

Some new performance numbers are also available. For this test I started
an Ubuntu 7.10 guest with 4 vcpus and 3G of RAM on a dual socket Opteron
box and ran kernbench -M in it with a 2.6.24 kernel as the source tree.
The test was done with traditional Shadow Paging and using Nested
Paging. The tests ran on the text console with GDM stopped. Here are the
results:

-----------------------------------------------------------------------
Average Half load -j 3 Run:
-----------------+-------------------------+---------------------------
                 | Nested Paging           | Shadow Paging
-----------------+-------------------------+---------------------------
                 | Time    (std deviation) | Time    (std deviation)
-----------------+-------------------------+---------------------------
Elapsed Time     |   147.574 (0.642168)    |   211.73  (0.802963)
User Time        |   382.036 (1.14742)     |   416.254 (1.91732)
System Time      |    48.29  (0.261151)    |   221.608 (0.706307)
Percent CPU      |   291     (0.707107)    |   300.8   (0.447214)
Context Switches | 33605.4   (148.788)     | 34901     (434.318)
Sleeps           | 47351     (98.2395)     | 47017.8   (378.582)
-----------------+-------------------------+---------------------------
Average Half load -j 16 Run:
-----------------+-------------------------+---------------------------
                 | Nested Paging           | Shadow Paging
-----------------+-------------------------+---------------------------
                 | Time    (std deviation) | Time    (std deviation)
-----------------+-------------------------+---------------------------
Elapsed Time     |   120.156 (0.337757)    |   179.162 (1.49999)
User Time        |   385.318 (3.57206)     |   421.624 (5.82785)
System Time      |    48.959 (0.811411)    |   230.8   (9.70806)
Percent CPU      |   327.6   (38.5982)     |   336.2   (37.3655)
Context Switches | 42435.5   (9312.09)     | 46190.7   (11909.6)
Sleeps           | 50297.5   (3111.73)     | 50688     (3882.49)
-----------------+-------------------------+---------------------------

In other words, Nested Paging gave 30% performance improvement in the
'make -j 3' run and a 33% improvement in the 'make -j 16' run for this
benchmark.

I think these patches are ready for merging into the KVM tree. Please
consider for inclusion.

Joerg Roedel





             reply	other threads:[~2008-02-07 12:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 12:47 Joerg Roedel [this message]
2008-02-07 12:47 ` [PATCH 1/8] SVM: move feature detection to hardware setup code Joerg Roedel
2008-02-07 12:47 ` [PATCH 2/8] SVM: add detection of Nested Paging feature Joerg Roedel
2008-02-07 12:47 ` [PATCH 3/8] SVM: add module parameter to disable Nested Paging Joerg Roedel
2008-02-07 12:47 ` [PATCH 4/8] X86: export information about NPT to generic x86 code Joerg Roedel
2008-02-07 12:47 ` [PATCH 5/8] MMU: make the __nonpaging_map function generic Joerg Roedel
2008-02-07 12:47 ` [PATCH 6/8] X86: export the load_pdptrs() function to modules Joerg Roedel
2008-02-07 12:47 ` [PATCH 7/8] MMU: add TDP support to the KVM MMU Joerg Roedel
2008-02-07 13:27   ` [kvm-devel] " Izik Eidus
2008-02-07 13:50     ` Joerg Roedel
2008-02-07 14:04       ` Izik Eidus
2008-02-07 12:47 ` [PATCH 8/8] SVM: add support for Nested Paging Joerg Roedel
2008-02-10 12:03 ` [kvm-devel] KVM: add support for SVM " 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=1202388465-8657-1-git-send-email-joerg.roedel@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: KVM: add support for SVM Nested Paging' \
    /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

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).