On 2016年03月10日 23:26, Paolo Bonzini wrote:
>
>
> On 10/03/2016 15:40, Xiao Guangrong wrote:
>> long dirty_count = kvm->tlbs_dirty;
>>
>> +/*
>> + * read tlbs_dirty before doing tlb flush to make sure not tlb
>> request is
>> + * lost.
>> + */
>> smp_mb();
On 03/11/2016 01:07 AM, Paolo Bonzini wrote:
On 09/03/2016 08:18, Lan Tianyu wrote:
How about the following comments.
Log for kvm_mmu_commit_zap_page()
/*
* We need to make sure everyone sees our modifications to
* the page tables and see changes to vcpu->mode here.
On 03/11/2016 12:04 AM, Paolo Bonzini wrote:
On 10/03/2016 16:45, Xiao Guangrong wrote:
Compared to smp_load_acquire(), smp_mb() adds an ordering between stores
and loads.
Here, the ordering is load-store, hence...
Yes, this is why i put smp_mb() in the code. :)
Here is a table of ba
On 09/03/2016 08:18, Lan Tianyu wrote:
> How about the following comments.
>
> Log for kvm_mmu_commit_zap_page()
> /*
>* We need to make sure everyone sees our modifications to
>* the page tables and see changes to vcpu->mode here.
Please mention that this pairs with vcpu_en
On 10/03/2016 16:45, Xiao Guangrong wrote:
>>
>>> Compared to smp_load_acquire(), smp_mb() adds an ordering between stores
>>> and loads.
>>
>> Here, the ordering is load-store, hence...
>
> Yes, this is why i put smp_mb() in the code. :)
Here is a table of barriers:
'. after|
On 03/10/2016 11:31 PM, Paolo Bonzini wrote:
On 10/03/2016 16:26, Paolo Bonzini wrote:
Compared to smp_load_acquire(), smp_mb() adds an ordering between stores
and loads.
Here, the ordering is load-store, hence...
Yes, this is why i put smp_mb() in the code. :)
On 10/03/2016 16:26, Paolo Bonzini wrote:
> Compared to smp_load_acquire(), smp_mb() adds an ordering between stores
> and loads.
Here, the ordering is load-store, hence...
> The load of kvm->tlbs_dirty should then be
>
> /*
>* Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in
On 10/03/2016 15:40, Xiao Guangrong wrote:
> long dirty_count = kvm->tlbs_dirty;
>
> +/*
> + * read tlbs_dirty before doing tlb flush to make sure not tlb
> request is
> + * lost.
> + */
> smp_mb();
> +
> if (kvm_make_all_cpus_request(kvm, KVM_REQ_T
On 03/08/2016 11:27 PM, Paolo Bonzini wrote:
On 08/03/2016 09:36, Lan Tianyu wrote:
Summary about smp_mb()s we met in this thread. If misunderstood, please
correct me. Thanks.
The smp_mb() in the kvm_flush_remote_tlbs() was introduced by the commit
a4ee1ca4 and it seems to keep the order of
On 2016年03月08日 23:27, Paolo Bonzini wrote:
> Unfortunately that patch added a bad memory barrier: 1) it lacks a
> comment; 2) it lacks obvious pairing; 3) it is an smp_mb() after a read,
> so it's not even obvious that this memory barrier has to do with the
> immediately preceding read of kvm->tlbs
On 08/03/2016 09:36, Lan Tianyu wrote:
> Summary about smp_mb()s we met in this thread. If misunderstood, please
> correct me. Thanks.
>
> The smp_mb() in the kvm_flush_remote_tlbs() was introduced by the commit
> a4ee1ca4 and it seems to keep the order of reading and cmpxchg
> kvm->tlbs_dirty.
On 2016年03月04日 16:49, Paolo Bonzini wrote:
> On 04/03/2016 08:12, Lan Tianyu wrote:
/*
- * wmb: make sure everyone sees our modifications to the page tables
- * rmb: make sure we see changes to vcpu->mode
>>>
>>> You want to leave the comment explaining the memory barriers and
On 03/04/2016 04:04 PM, Paolo Bonzini wrote:
On 04/03/2016 02:35, Lan Tianyu wrote:
The following kvm_flush_remote_tlbs() will call smp_mb() inside and so
remove smp_mb() here.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/arch/x
On 04/03/2016 08:12, Lan Tianyu wrote:
> > > /*
> > > - * wmb: make sure everyone sees our modifications to the page tables
> > > - * rmb: make sure we see changes to vcpu->mode
> >
> > You want to leave the comment explaining the memory barriers and tell that
> > kvm_flush_remote_tlbs() conta
On 04/03/2016 02:35, Lan Tianyu wrote:
> The following kvm_flush_remote_tlbs() will call smp_mb() inside and so
> remove smp_mb() here.
>
> Signed-off-by: Lan Tianyu
> ---
> arch/x86/kvm/mmu.c | 6 --
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
On 2016年03月04日 15:21, Thomas Gleixner wrote:
> On Fri, 4 Mar 2016, Lan Tianyu wrote:
>
>> The following kvm_flush_remote_tlbs() will call smp_mb() inside and so
>> remove smp_mb() here.
>>
>> Signed-off-by: Lan Tianyu
>> ---
>> arch/x86/kvm/mmu.c | 6 --
>> 1 file changed, 6 deletions(-)
>>
On Fri, 4 Mar 2016, Lan Tianyu wrote:
> The following kvm_flush_remote_tlbs() will call smp_mb() inside and so
> remove smp_mb() here.
>
> Signed-off-by: Lan Tianyu
> ---
> arch/x86/kvm/mmu.c | 6 --
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
17 matches
Mail list logo