public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 00/10] KVM: Add TMEM host/guest support
@ 2012-06-06 13:07 Sasha Levin
  2012-06-06 13:24 ` Avi Kivity
  0 siblings, 1 reply; 20+ messages in thread
From: Sasha Levin @ 2012-06-06 13:07 UTC (permalink / raw)
  To: avi, mtosatti, gregkh, sjenning, dan.magenheimer, konrad.wilk
  Cc: kvm, Sasha Levin

This patch series adds support for passing TMEM commands between KVM guests
and the host. This opens the possibility to use TMEM cross-guests and
posibly across hosts with RAMster.

Since frontswap was merged in the 3.4 cycle, the kernel now has all facilities
required to work with TMEM. There is no longer a dependency on out of tree
code.

We can split this patch series into two:

 - The guest side, which is basically two shims that proxy mm/cleancache.c
 and mm/frontswap.c requests from the guest back to the host. This is done
 using a new KVM_HC_TMEM hypercall.

 - The host side, which is a rather small shim which connects KVM to zcache.


It's worth noting that this patch series don't have any significant logic in
it, and is mostly a collection of shims to pass TMEM commands across hypercalls.

I ran benchmarks using both the "streaming test" proposed by Avi, and some
general fio tests. Since the fio tests showed similar results to the
streaming test, and no anomalies, here is the summary of the streaming tests:

First, trying to stream a 26GB random file without KVM TMEM:
real    7m36.046s
user    0m17.113s
sys     5m23.809s

And with KVM TMEM:
real    7m36.018s
user    0m17.124s
sys     5m28.391s

 - No significant difference.

Now, trying to stream a 16gb file that compresses nicely, first without KVM TMEM:
real    5m10.299s
user    0m11.311s
sys     3m40.139s

And a second run without dropping cache:
real    4m33.951s
user    0m10.869s
sys     3m13.789s

Now, with KVM TMEM:
real    4m55.528s
user    0m11.119s
sys     3m33.243s

And a second run:
real    2m53.713s
user    0m7.971s
sys     2m29.807s

So KVM TMEM shows a nice performance increase once it can store pages on the host.

Sasha Levin (10):
  KVM: reintroduce hc_gpa
  KVM: wire up the TMEM HC
  zcache: export zcache interface
  KVM: add KVM TMEM entries in the appropriate config menu entry
  KVM: bring in general tmem definitions
  zcache: move out client declaration and add a KVM client
  KVM: add KVM TMEM host side interface
  KVM: add KVM TMEM guest support
  KVM: support guest side cleancache
  KVM: support guest side frontswap

 arch/x86/kvm/Kconfig                 |    1 +
 arch/x86/kvm/Makefile                |    2 +
 arch/x86/kvm/tmem/Kconfig            |   43 +++++++++++
 arch/x86/kvm/tmem/Makefile           |    6 ++
 arch/x86/kvm/tmem/cleancache.c       |  120 +++++++++++++++++++++++++++++
 arch/x86/kvm/tmem/frontswap.c        |  139 ++++++++++++++++++++++++++++++++++
 arch/x86/kvm/tmem/guest.c            |   95 +++++++++++++++++++++++
 arch/x86/kvm/tmem/guest.h            |   11 +++
 arch/x86/kvm/tmem/host.c             |   78 +++++++++++++++++++
 arch/x86/kvm/tmem/host.h             |   20 +++++
 arch/x86/kvm/tmem/tmem.h             |   62 +++++++++++++++
 arch/x86/kvm/x86.c                   |   13 +++
 drivers/staging/zcache/zcache-main.c |   48 ++++++++++--
 drivers/staging/zcache/zcache.h      |   20 +++++
 include/linux/kvm_para.h             |    1 +
 15 files changed, 652 insertions(+), 7 deletions(-)
 create mode 100644 arch/x86/kvm/tmem/Kconfig
 create mode 100644 arch/x86/kvm/tmem/Makefile
 create mode 100644 arch/x86/kvm/tmem/cleancache.c
 create mode 100644 arch/x86/kvm/tmem/frontswap.c
 create mode 100644 arch/x86/kvm/tmem/guest.c
 create mode 100644 arch/x86/kvm/tmem/guest.h
 create mode 100644 arch/x86/kvm/tmem/host.c
 create mode 100644 arch/x86/kvm/tmem/host.h
 create mode 100644 arch/x86/kvm/tmem/tmem.h
 create mode 100644 drivers/staging/zcache/zcache.h

-- 
1.7.8.6


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

end of thread, other threads:[~2012-06-12 17:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 13:07 [RFC 00/10] KVM: Add TMEM host/guest support Sasha Levin
2012-06-06 13:24 ` Avi Kivity
2012-06-08 13:20   ` Sasha Levin
2012-06-08 16:06     ` Dan Magenheimer
2012-06-11 11:17       ` Avi Kivity
2012-06-11  8:09     ` Avi Kivity
2012-06-11 10:26       ` Sasha Levin
2012-06-11 11:45         ` Avi Kivity
2012-06-11 15:44           ` Dan Magenheimer
2012-06-11 17:06             ` Avi Kivity
2012-06-11 19:25               ` Sasha Levin
2012-06-11 19:56                 ` Sasha Levin
2012-06-12 11:46                   ` Avi Kivity
2012-06-12 11:58                     ` Gleb Natapov
2012-06-12 12:01                       ` Avi Kivity
2012-06-12 10:12                 ` Avi Kivity
2012-06-12  1:18               ` Dan Magenheimer
2012-06-12 10:09                 ` Avi Kivity
2012-06-12 16:40                   ` Dan Magenheimer
2012-06-12 17:54                     ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox