On 04/19/2016 03:37 PM, Pedro Alves wrote: > On 04/19/2016 02:25 PM, Andrew Haley wrote: >> On 04/19/2016 02:19 PM, Michael Matz wrote: >> >>> Well, yeah, that's traditional insn caches on multiple cores. From >>> user space you need kernel help for this, doing interprocess >>> interrupts to flush all such buffers on all cores (or at least those >>> potentially fetching stuff in the patched region, if such >>> granularity is possible). An implementation providing such is >>> non-broken :) >> >> Sure. If you know of any such facility in Linux userspace, please let >> me know. :-) > > Sounds like a job for the sys_membarrier system call: > > https://lkml.org/lkml/2015/3/18/531 > https://lwn.net/Articles/369567/ > > I think it's available in Linux 4.3+.
So it is, thanks. I'm guessing that might be good enough for full instruction synchronization barriers, but from looking at the kernel source I can't really tell. Andrew.