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 notifiers update
>>> kvm
>>> about the changes in the host page table)
>>>
>>>
>>>>
>>>> What about KSM being used by someone other than KVM ? Does KSM updates
>>>> the ptes of the shared pages itself ?
>>>>
>>>>
>>>
>>> it can be used by any application, it update the ptes of the host, what
>>> you
>>> mean by the shared pages itself?
>>>
>>
>> by "itself" I meant 'ksm'. So ksm will take care of updating the ptes
>> of the shared guest pages.
>>
>
> yes
>
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> Where are the shared pages kept ? In kernel memory ? Aren't the shared
>>>>>> pages always pinned in RAM (due to same reasons for pinned shadowed
>>>>>> pages) ?
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> in the version that was sent to the list it was kernel memory (meaning
>>>>> shared pages are not swappable
>>>>> (just the pages that are shared not the pages that we scan, when they
>>>>> are
>>>>> split beacuse of copy on write it become swappable again
>>>>> new version that i will send soon the pages are normal
>>>>> anonymous/userspace
>>>>> memory that is swappable
>>>>>
>>>>>
>>>>>
>>>>
>>>> What is the strategy/method which you will use to represent the shared
>>>> memory as normal anonymous/userspace memory ? Then, these pages must
>>>> be staying at one of the guest's address-space (whose pages have been
>>>>  shared) ?
>>>>
>>>>
>>>
>>> it possible due to another patch that i need to send, that allow modules
>>> register new reverse mapping call backs...,
>>>
>>>
>>
>> ok
>>
>> but in whose address-space will these shared pages stay ?
>>
>>
>
> if we have 5 applications sharing the same page, we will have the page stay
> in 5 diffrent address-spaces...
>
>>
>>>>
>>>>
>>>>>>
>>>>>> How much is the overhead involved due to this ?
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> depeand on the speed you tell it to scan, but the overhead is about ~5%
>>>>> for
>>>>> common cases
>>>>>
>>>>>
>>>>
>>>> Can I know the typical values of the parameters : sleep time, no. of
>>>> pages to scan, which you used to arrive at the above mentioned
>>>> overhead.
>>>>
>>>>
>>>
>>> i think it is about 256 2000 (256 pages per 2000 usleep)
>>> (note that most of the cpu is acutlay taken by the copying of the pages
>>> when
>>> a new shared page is created, i have possible way to change it and reduce
>>> the cpu even more
>>> but i dont know if i want to do it) (it add more IFs to the fast path
>>> inside
>>> the mm)
>>>
>>>
>>>
>>>>
>>>>
>>>
>>>
>>
>> Thanks :)
>>
>>
>
>



-- 
Regards,
Sukanto Ghosh

Reply via email to