Going through your slide increasing the virtual machine density with
ksm I got an idea about how KSM works internally.
1. Scan registered memory area
2. During scan of every page P, generate
hashval = hashfn(content of P)
3. The hashval is used as an index into the hashtable, the pfn of P is
ציטוט Sukanto Ghosh:
Can anyone answer these queries regarding KSM ?
How does KSM offers its services through the /dev/ksm device ?
ioctls
Are every guest pages scanned in KVM while using KSM or page-scanning
and sharing is triggered on some event (low memory, etc) ?
no, the scanning
Doesn't KSM notifies KVM about the shared pages so that KVM can update
its sptes accordingly or is it done by KSM itself ?
when using kvm, mmu notifiers is a must for ksm, (mmu notifiers update kvm
about the changes in the host page table)
What about KSM being used by someone other than
ציטוט Sukanto Ghosh:
Doesn't KSM notifies KVM about the shared pages so that KVM can update
its sptes accordingly or is it done by KSM itself ?
when using kvm, mmu notifiers is a must for ksm, (mmu notifiers update kvm
about the changes in the host page table)
What about KSM
got it. thanks
On Fri, Jul 11, 2008 at 12:50 AM, Izik Eidus [EMAIL PROTECTED] wrote:
ציטוט Sukanto Ghosh:
Doesn't KSM notifies KVM about the shared pages so that KVM can update
its sptes accordingly or is it done by KSM itself ?
when using kvm, mmu notifiers is a must for ksm, (mmu
One more query, what if multiple processes call ioctl KSM_CREATE_SCAN
? Will there be multiple scanners ?
Consider a scenario where two processes A B separately call
KSM_CREATE_SCAN and then start registering some memory pages/areas via
KSM_CREATE_SHARED_MEMORY_AREA ioctl.
Lets say A registers 4
ציטוט Sukanto Ghosh:
One more query, what if multiple processes call ioctl KSM_CREATE_SCAN
? Will there be multiple scanners ?
yes
Consider a scenario where two processes A B separately call
KSM_CREATE_SCAN and then start registering some memory pages/areas via