I hadn't heard about this. Cool. Two obvious questions:<p>1) You are supposed to check the cpu number at the start and end of your critical section, to make sure it hasn't changed. But what if it has changed twice? There should be a "changed" flag in the struct, I'd think.<p>2) Does the single instruction commit not itself need a lock prefix or something similar? Futex has to do something like that unless I'm mistaken.<p>Actually, 3) if your cpu supports something like TSX (did Intel ever get that working right?), would you want to use that in preference to rseq?
I couldn't follow the reference, and it isn't spelled out in the entry. this sounds like optimistic concurrency control. which is lovely, but performs poorly under high contention. does anyone know offhand (I guess I should track down that paper)
This looks cool!<p>Predictably it's a C-only API. I'm curious what using this facility would look like from within Golang or Java.<p>I'll admit I'm not savvy enough to say whether it would really even make sense to try. I'm curious on how it'd interact with the JVM.