lkml.org 
[lkml]   [2010]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 5/7] KVM: handle more completed apfs if possible
On 11/01/2010 05:24 PM, Gleb Natapov wrote:

>> - put_page(work->page);
>> - kmem_cache_free(async_pf_cache, work);
>> + list_del(&work->queue);
>> + vcpu->async_pf.queued--;
>> + if (work->page)
>> + put_page(work->page);
>> + kmem_cache_free(async_pf_cache, work);
>> + } while (ret && !list_empty_careful(&vcpu->async_pf.done));
>> }
>>
> No need to change kvm_arch_async_page_present() to return anything. You
> can do while loop like this:
>
> while (!list_empty_careful(&vcpu->async_pf.done) &&
> kvm_arch_can_inject_async_page_present(vcpu)) {
> }
>
> If kvm_arch_async_page_present() call injects exception
> kvm_arch_can_inject_async_page_present() will return false on next
> iteration.

Yeah, it's a better way, i'll fix it, thanks Gleb!


\
 
 \ /
  Last update: 2010-11-01 10:33    [W:0.042 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site