[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51A2BEB5.9030900@linux.vnet.ibm.com>
Date: Mon, 27 May 2013 10:02:29 +0800
From: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@...hat.com>
CC: gleb@...hat.com, avi.kivity@...il.com, pbonzini@...hat.com,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH v7 03/11] KVM: MMU: fast invalidate all pages
Hi Marcelo,
On 05/25/2013 04:23 AM, Marcelo Tosatti wrote:
>> +static void kvm_zap_obsolete_pages(struct kvm *kvm)
>> +{
>> + struct kvm_mmu_page *sp, *node;
>> + LIST_HEAD(invalid_list);
>> +
>> +restart:
>> + list_for_each_entry_safe_reverse(sp, node,
>> + &kvm->arch.active_mmu_pages, link) {
>> + /*
>> + * No obsolete page exists before new created page since
>> + * active_mmu_pages is the FIFO list.
>> + */
>> + if (!is_obsolete_sp(kvm, sp))
>> + break;
>
> Can you add a comment to list_add(x, active_mmu_pages) callsites
> mentioning this case?
>
> Because it'll break silently if people do list_add_tail().
Sure, I will do it in the next version.
And i totally agree with Gleb's points that reply your other questions
in this patch.
Thank you all!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists