public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Andrea Arcangeli <andrea@qumranet.com>
Cc: Avi Kivity <avi@qumranet.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm-devel <kvm@vger.kernel.org>
Subject: Re: madvise() not triggering page discard with MMU-notifiers
Date: Thu, 28 Aug 2008 17:55:34 -0500	[thread overview]
Message-ID: <48B72CE6.9070306@us.ibm.com> (raw)
In-Reply-To: <20080828142356.GA19754@duo.random>

Andrea Arcangeli wrote:
> On Mon, Aug 18, 2008 at 05:04:25PM -0500, Anthony Liguori wrote:
>   
>> +    if (!kvm_enabled() || !qemu_kvm_has_mmu_notifiers())
>> +        madvise(addr, TARGET_PAGE_SIZE,
>> +                deflate ? MADV_WILLNEED : MADV_DONTNEED);
>>     
>
> The check was reversed so madvise wasn't invoked in the first place if
> mmu notifier was enabled in the host kernel. This should fix it
> (untested):
>
>        if (!kvm_enabled() || kvm_has_sync_mmu())
>   

Ugh, sorry about that Andrea.

I've sent out an updated patch set.  With MMU notifiers, ballooning is 
working exactly as expected.

Regards,

Anthony Liguori


      reply	other threads:[~2008-08-28 22:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 22:04 madvise() not triggering page discard with MMU-notifiers Anthony Liguori
2008-08-20  1:16 ` Marcelo Tosatti
2008-08-20 20:38   ` Anthony Liguori
2008-08-28 14:23 ` Andrea Arcangeli
2008-08-28 22:55   ` Anthony Liguori [this message]

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=48B72CE6.9070306@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=andrea@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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