On 02/09/2016 20:23, Pranith Kumar wrote:
> If I understand you correctly, this is what might happen without the
> barrier():
>
> P0P1
>
> // bh = ctx->first_bh; optimized
> if (ctx->first_bh)
Paolo Bonzini writes:
> On 02/09/2016 16:33, Pranith Kumar wrote:
>>
>> Hi Paolo,
>>
>> This is in reference to the discussion we had yesterday on IRC. I am trying
>> to
>> understand the need for smp_read_barrier_depends() and how it prevents the
>> following race condition. I think a regular
On 02/09/2016 16:33, Pranith Kumar wrote:
>
> Hi Paolo,
>
> This is in reference to the discussion we had yesterday on IRC. I am trying to
> understand the need for smp_read_barrier_depends() and how it prevents the
> following race condition. I think a regular barrier() should suffice instead
Hi Paolo,
This is in reference to the discussion we had yesterday on IRC. I am trying to
understand the need for smp_read_barrier_depends() and how it prevents the
following race condition. I think a regular barrier() should suffice instead
of smp_read_barrier_depends(). Consider:
P0