lkml.org 
[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [test result] dirty logging without srcu update -- Re: [RFC][PATCH] srcu: Implement call_srcu()
Avi Kivity <avi@redhat.com> wrote:

> > I have one concern about correctness issue though:
> >
> > concurrent rmap write protection may not be safe due to
> > delayed tlb flush ... cannot happen?
>
> What do you mean by concurrent rmap write protection?
>

Not sure, but other codes like:

- mmu_sync_children()
for_each_sp(pages, sp, parents, i)
protected |= rmap_write_protect(vcpu->kvm, sp->gfn);

if (protected)
kvm_flush_remote_tlbs(vcpu->kvm);

- kvm_mmu_get_page()
if (rmap_write_protect(vcpu->kvm, gfn))
kvm_flush_remote_tlbs(vcpu->kvm);

I just wondered what can happen if GET_DIRTY_LOG is being processed
behind these processing?

They may find nothing to write protect and won't do kvm_flush_remote_tlbs()
if the gfn has been already protected by GET_DIRTY_LOG.

But GET_DIRTY_LOG may still be busy write protecting other pages and
others can return before. (My code releases mmu_lock to not include
__put_user() in the critical section.)

I am not still enough familier with these code yet.
(maybe empty concern)

Takuya


\
 
 \ /
  Last update: 2012-02-02 15:47    [W:1.360 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site