All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.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 17:25:24 +0800	[thread overview]
Message-ID: <4BE28B04.2010305@cn.fujitsu.com> (raw)
In-Reply-To: <4BE286EA.3070206@redhat.com>

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.

Thanks,
Gui

> 


  reply	other threads:[~2010-05-06  9:26 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 [this message]
2010-05-06  9:30     ` Avi Kivity

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=4BE28B04.2010305@cn.fujitsu.com \
    --to=guijianfeng@cn.fujitsu.com \
    --cc=avi@redhat.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 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.