lkml.org 
[lkml]   [2013]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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!



\
 
 \ /
  Last update: 2013-05-27 04:41    [W:0.112 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site