Messages in this thread | | | Date | Fri, 12 Jun 2015 09:08:27 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 11/18] seqcount: Introduce raw_write_seqcount_barrier() |
| |
On Thu, Jun 11, 2015 at 02:45:57PM -0700, Paul E. McKenney wrote: > Color me slow and stupid. Maybe due to reviewing a patch too early in > the morning, who knows? > > There is nothing above that prevents the compiler and the CPU from > reordering the assignments to X and Y with the increment of s->sequence++.
That's actually fine. As long as we observe an odd value the read side will repeat.
> Of course, this assumes that the accesses surrounding the call to > raw_write_seqcount_barrier() are writes.
Which is why its got both write and barrier in the name :-)
| |