qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] aio: Remove spurious smp_read_barrier_depends()


From: Pranith Kumar
Subject: Re: [Qemu-block] [PATCH] aio: Remove spurious smp_read_barrier_depends()
Date: Thu, 1 Sep 2016 10:40:23 -0400

On Thu, Sep 1, 2016 at 7:01 AM, Paolo Bonzini <address@hidden> wrote:
>
>
> On 01/09/2016 00:29, Pranith Kumar wrote:
>> smp_read_barrier_depends() should be used only if you are reading
>> dependent pointers which are shared.
>
> 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.

I really doubt if we see this kind of re-ordering. Did we ever get any
bug reports about running qemu on an SMP Alpha?

smp_read_barrier_depends() is evil and I would prefer we get rid of it.

Thanks,
-- 
Pranith



reply via email to

[Prev in Thread] Current Thread [Next in Thread]