[Tmem-devel] [Xen-devel] Queries on KSM & Tmem

Dan Magenheimer dan.magenheimer at oracle.com
Mon Sep 13 09:48:41 PDT 2010


> From: ash win [mailto:ash_win012006 at yahoo.com]
> Sent: Sunday, September 12, 2010 12:34 PM
> To: Xen-devel at lists.xensource.com; tmem-devel at oss.oracle.com
> Cc: Dan Magenheimer; ashwin
> Subject: [Xen-devel] Queries on KSM & Tmem
> 
> Does XEN fully support KSM (Kernel Samepage Merging)? if yes then whats
> the use of tmem?I understand the fact that KSM may provide
> overcommitment to the Guest OSs but at the cost of CPU utilization for
> finding and merging same pages,but KSM can also be disabled.

KSM was designed to work for KVM and runs in the KVM "host" Linux
kernel, so KSM does not work for Xen.  KSM is essentially the same
as VMware transparent page sharing, though the underlying implementation
is different.

Tmem is very different from KSM (and transparent page sharing) even
though they have similar objectives.  Importantly, tmem avoids
"host swapping" which is a big problem for any page sharing
implementation.

> And why tmem supports only PV and not HVM ?If complete overcommitment
> is not good according to tmem concept then why page sharing is allowed
> in HVM? Whether overcommitment is not provided to HVM Guest?

Tmem requires kernel changes.  It actually DOES work with HVM
as long as the HVM kernel has these changes.  I have implemented
these changes on top of recently submitted PV-on-HVM Linux
changes and tmem works fine.  However, HVM kernels such as
Microsoft Windows without tmem changes cannot use tmem.

Hope that helps!
Dan



More information about the Tmem-devel mailing list