Re: kvm userspace: ksm support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anthony Liguori wrote:
> Izik Eidus wrote:
>>
>> You mean: when we later call for other madvise calls, if it will
>> remove the MADV_MERGEABLE from that memory?
>> if yes, the answer is no, it should be still l left in the
>> vma->vm_flags...
> 
> Excellent.
> 
>>>
>>> I'd suggest doing the following in osdep.h too:
>>>
>>> #if !defined(MADV_MERGABLE)
>>> #define MADV_MERGABLE MADV_NORMAL
>>> #endif
>>>
>>> To avoid #ifdefs in .c files.
>>
>> I tried to follow the way DONTFORK madvise is working...
>>
>> So you say, just to throw this thing into osdep.h instead of that c file?
> 
> Yes.
> 
> I think the DONTFORK thing is a bit odd.  Of course we have
> MADV_DONTFORK if we're running KVM.  I'm not sure why that is there.
> 
> I also think that we could get away with getting rid of any checks for
> !sync_mmu() since that was introduced in 2.6.27.

The problem is that your host kernel also must have CONFIG_MMU_NOTIFIER
enabled - and that's not always the case.

> 
> Otherwise, you should technically avoid doing madvise() unless we have
> sync_mmu().
> 
> Regards,
> 
> Anthony Liguori

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux