[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] aio: Remove spurious smp_read_barrier_depends()
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] aio: Remove spurious smp_read_barrier_depends() |
Date: |
Thu, 1 Sep 2016 17:10:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 01/09/2016 16:40, Pranith Kumar wrote:
>> >
>> > bh is shared since it is equal to ctx->first_bh or
>> > ctx->first_bh->...->next. While the compiler will always order the load
>> > of bh->next after the load of ctx->first_bh and any previous load of
>> > bh->next, this may not be the case for the processor. Only the DEC
>> > Alpha has this behavior, but it _can_ happen.
> In that case there are a bunch of places in the same file where we
> need to insert this barrier. I also guarantee that there are many more
> files which would need this barrier if we examine closely.
If it's protected by a lock, it's not necessary.
If you don't like smp_read_barrier_depends, you can introduce a synonym
for atomic_rcu_read with another name. But the functionality is required.
Paolo