Hi,

On Wed, 11 Apr 2012 11:11:07 +0800
Xiao Guangrong <[email protected]> wrote:

> >  restart:
> > -   list_for_each_entry_safe(sp, node, &kvm->arch.active_mmu_pages, link)
> > -           if (kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list))
> > -                   goto restart;
> > +   zapped = 0;
> > +   list_for_each_entry_safe(sp, node, &kvm->arch.active_mmu_pages, link) {
> > +           if ((slot >= 0) && !test_bit(slot, sp->slot_bitmap))
> > +                   continue;
> > +
> > +           zapped |= kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list);
> 
> 
> You should "goto restart" here like the origin code, also, "safe" version of
> list_for_each is not needed.


Thank you for looking into this part.

I understand that we can eliminate _safe in the original implementation.


Can you tell me the reason why we should do "goto restart" immediately here?
For performance, or correctness issue?

I thought doing "goto restart" after the list scan would be more efficient.

        Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to