From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Izik Eidus <ieidus@redhat.com>,
kvm@vger.kernel.org, "Justin M. Forbes" <jforbes@redhat.com>,
Mark McLoughlin <markmc@redhat.com>
Subject: Re: kvm userspace: ksm support
Date: Wed, 29 Jul 2009 10:51:02 +0200 [thread overview]
Message-ID: <4A700D76.50401@siemens.com> (raw)
In-Reply-To: <4A6FA576.6020806@codemonkey.ws>
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
next prev parent reply other threads:[~2009-07-29 8:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 16:39 kvm userspace: ksm support Izik Eidus
2009-07-28 16:41 ` Anthony Liguori
2009-07-28 16:50 ` Izik Eidus
2009-07-29 1:27 ` Anthony Liguori
2009-07-29 8:51 ` Jan Kiszka [this message]
2009-07-29 9:30 ` Avi Kivity
2009-08-03 18:08 ` Brian Jackson
2009-08-03 18:09 ` Izik Eidus
2009-08-03 18:37 ` Brian Jackson
2009-08-03 19:04 ` Izik Eidus
2009-08-05 18:38 ` Brian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A700D76.50401@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=anthony@codemonkey.ws \
--cc=ieidus@redhat.com \
--cc=jforbes@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).