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 > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html