The membarrier syscall was added in kernel 4.3 by the following kernel commit: ==== commit 5b25b13ab08f616efd566347d809b4ece54570d1 Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Date: Fri Sep 11 13:07:39 2015 -0700 sys_membarrier(): system-wide memory barrier (generic, x86) Here is an implementation of a new system call, sys_membarrier(), which executes a memory barrier on all threads running on the system. It is implemented by calling synchronize_sched(). It can be used to distribute the cost of user-space memory barriers asymmetrically by transforming pairs of memory barriers into pairs consisting of sys_membarrier() and a compiler barrier. For synchronization primitives that distinguish between read-side and write-side (e.g. userspace RCU [1], rwlocks), the read-side can be accelerated significantly by moving the bulk of the memory barrier overhead to the write-side. ==== Support for membarrier() should be added to the syscall tapset.
Support added in commit 025980d.