The 5-year journey to bring restartable sequences to Linux (2019)
efficios.com
efficios.com
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.
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.
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?
Predictably it's a C-only API. I'm curious what using this facility would look like from within Golang or Java.
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.