From: Avi Kivity <avi@redhat.com>
To: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: make kvm_mmu_zap_page() return the number of pages it actually freed.
Date: Thu, 06 May 2010 12:30:55 +0300 [thread overview]
Message-ID: <4BE28C4F.50209@redhat.com> (raw)
In-Reply-To: <4BE28B04.2010305@cn.fujitsu.com>
On 05/06/2010 12:25 PM, Gui Jianfeng wrote:
> Avi Kivity wrote:
>
>> On 05/05/2010 04:03 AM, Gui Jianfeng wrote:
>>
>>> Currently, kvm_mmu_zap_page() returning the number of freed children sp.
>>> This might confuse the caller, because caller don't know the actual freed
>>> number. Let's make kvm_mmu_zap_page() return the number of pages it
>>> actually
>>> freed.
>>>
>>>
>>>
>> if (kvm_mmu_zap_page(kvm, sp))
>> goto restart;
>>
>> Needs to be updated.
>>
> Hi Avi,
>
> if kvm_mmu_zap_page() returns 1, we don't know whether the freed sp is the one we passes into
> or the child. So here just restart hash walk as long as kvm_mmu_zap_page() returning a positive
> number, although sometimes un-needed hash walk will happen. This fix gets code simpler, the
> idea comes from Marcelo.
>
I see. Note this can invoke quadratic behaviour. I'll apply the patch,
but we need to improve this area.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-05-06 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 1:03 [PATCH] KVM: make kvm_mmu_zap_page() return the number of pages it actually freed Gui Jianfeng
2010-05-06 9:07 ` Avi Kivity
2010-05-06 9:25 ` Gui Jianfeng
2010-05-06 9:30 ` 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=4BE28C4F.50209@redhat.com \
--to=avi@redhat.com \
--cc=guijianfeng@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).