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+. Thanks, Pedro Alves