public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@qumranet.com>
To: Anthony Liguori <aliguori@us.ibm.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 16:23:56 +0200	[thread overview]
Message-ID: <20080828142356.GA19754@duo.random> (raw)
In-Reply-To: <48A9F1E9.6040907@us.ibm.com>

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())

  parent reply	other threads:[~2008-08-28 14:24 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 [this message]
2008-08-28 22:55   ` Anthony Liguori

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=20080828142356.GA19754@duo.random \
    --to=andrea@qumranet.com \
    --cc=aliguori@us.ibm.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