From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org, gleb@redhat.com
Subject: Re: [PATCH v2] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended
Date: Wed, 22 Aug 2012 15:27:30 +0300 [thread overview]
Message-ID: <5034D032.4010707@redhat.com> (raw)
In-Reply-To: <20120820183539.6604a317.yoshikawa.takuya@oss.ntt.co.jp>
On 08/20/2012 12:35 PM, Takuya Yoshikawa wrote:
> Although the possible race described in
>
> commit 85b7059169e128c57a3a8a3e588fb89cb2031da1
> KVM: MMU: fix shrinking page from the empty mmu
>
> was correct, the real cause of that issue was a more trivial bug of
> mmu_shrink() introduced by
>
> commit 1952639665e92481c34c34c3e2a71bf3e66ba362
> KVM: MMU: do not iterate over all VMs in mmu_shrink()
>
> Here is the bug:
>
> if (kvm->arch.n_used_mmu_pages > 0) {
> if (!nr_to_scan--)
> break;
> continue;
> }
>
> We skip VMs whose n_used_mmu_pages is not zero and try to shrink others:
> in other words we try to shrink empty ones by mistake.
>
> This patch reverses the logic so that mmu_shrink() can free pages from
> the first VM whose n_used_mmu_pages is not zero. Note that we also add
> comments explaining the role of nr_to_scan which is not practically
> important now, hoping this will be improved in the future.
>
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Thanks, applied to master for 3.6.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-08-22 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 9:35 [PATCH v2] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended Takuya Yoshikawa
2012-08-22 12:27 ` Avi Kivity [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=5034D032.4010707@redhat.com \
--to=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.