Skip to contentSkip to conversation

Queries on KSM & Tmem

DISCUSSION ash win 2 participants 2 messages Sep 12, 2010 – Sep 13, 2010

lore
Share & tools
lore

ash win

author
#0 lore raw

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.

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?

--Regards
Ashwin Vasani
Pune Institute of Computer Technology
Pune,India

#1 lore raw
Quoted 10 lines

From: ash win [mailto:[email protected]]
Sent: Sunday, September 12, 2010 12:34 PM
To: [email protected]; [email protected]
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.

Quoted 3 lines

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