Re: KSM Algorithm

2008-07-19 Thread Sukanto Ghosh
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

Re: KSM Algorithm

2008-07-10 Thread Izik Eidus
ציטוט 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

Re: KSM Algorithm

2008-07-10 Thread 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 being used by someone other than

Re: KSM Algorithm

2008-07-10 Thread Izik Eidus
ציטוט 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

Re: KSM Algorithm

2008-07-10 Thread Sukanto Ghosh
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

Re: KSM Algorithm

2008-07-10 Thread Sukanto Ghosh
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

Re: KSM Algorithm

2008-07-10 Thread Izik Eidus
ציטוט 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