kvm: use private futexes.

Use private futexes for performance and to align with other runtime uses.

PiperOrigin-RevId: 219422634
Change-Id: Ief2af5e8302847ea6dc246e8d1ee4d64684ca9dd
This commit is contained in:
Adin Scannell
2018-10-30 22:46:42 -07:00
committed by Shentubot
parent 245d81561b
commit 0091db9cbd
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ func (c *vCPU) notify() {
_, _, errno := syscall.RawSyscall6(
syscall.SYS_FUTEX,
uintptr(unsafe.Pointer(&c.state)),
linux.FUTEX_WAKE,
linux.FUTEX_WAKE|linux.FUTEX_PRIVATE_FLAG,
^uintptr(0), // Number of waiters.
0, 0, 0)
if errno != 0 {
@@ -106,7 +106,7 @@ func (c *vCPU) waitUntilNot(state uint32) {
_, _, errno := syscall.Syscall6(
syscall.SYS_FUTEX,
uintptr(unsafe.Pointer(&c.state)),
linux.FUTEX_WAIT,
linux.FUTEX_WAIT|linux.FUTEX_PRIVATE_FLAG,
uintptr(state),
0, 0, 0)
if errno != 0 && errno != syscall.EINTR && errno != syscall.EAGAIN {
-1
View File
@@ -438,7 +438,6 @@ func ptraceFilters() seccomp.SyscallRules {
func kvmFilters() seccomp.SyscallRules {
return seccomp.SyscallRules{
syscall.SYS_ARCH_PRCTL: {},
syscall.SYS_FUTEX: {},
syscall.SYS_IOCTL: {},
syscall.SYS_MMAP: {},
syscall.SYS_RT_SIGSUSPEND: {},