On 7/13/23 12:32, Peter Maydell wrote:
On Fri, 7 Jul 2023 at 11:30, Richard Henderson
<[email protected]> wrote:
Read the left and right trees once, so that the gating
tests are meaningful. This was only a problem at -O0,
where the compiler didn't CSE the two reads.
Cc: [email protected]
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
If this data structure is intended to support operations
being done on it while it's being mutated, shouldn't it
be using the atomic accessors, though? That would make
it clearer that you can't just undo the transformation
made by this patch.
Yes, it probably should. I use qatomic_set() where the kernel used WRITE_ONCE, but there
was no markup for the read side.
r~