From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: [RFC PATCH v7 0/7] Restartable sequences system call Date: Thu, 21 Jul 2016 17:14:15 -0400 Message-ID: <1469135662-31512-1-git-send-email-mathieu.desnoyers@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Return-path: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Paul Turner , Andrew Hunter , Peter Zijlstra , Andy Lutomirski , Andi Kleen , Dave Watson , Chris Lameter , Ben Maurer , Steven Rostedt , "Paul E. McKenney" , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Boqun Feng , Mathieu Desnoyers List-Id: linux-api@vger.kernel.org Hi, This is mostly a re-write of Paul Turner and Andrew Hunter's restartable critical sections (percpu atomics), which brings the following main benefits over Paul Turner's prior version (v2): - The ABI is now architecture-agnostic, and it requires fewer instruction on the user-space fast path, - Ported to ARM 32, in addition to cover x86 32/64. Adding support for new architectures is now trivial, - Progress is ensured by a fall-back to locking (purely userspace) when single-stepped by a debugger. This is v7, as it derives from my prior getcpu cache and thread local ABI patchsets. You will find benchmark results in the changelog of patch 1/7. Feedback is welcome! Thanks, Mathieu Mathieu Desnoyers (7): Restartable sequences system call tracing: instrument restartable sequences Restartable sequences: ARM 32 architecture support Restartable sequences: wire up ARM 32 system call Restartable sequences: x86 32/64 architecture support Restartable sequences: wire up x86 32/64 system call Restartable sequences: self-tests MAINTAINERS | 7 + arch/Kconfig | 7 + arch/arm/Kconfig | 1 + arch/arm/include/uapi/asm/unistd.h | 1 + arch/arm/kernel/calls.S | 1 + arch/arm/kernel/signal.c | 7 + arch/x86/Kconfig | 1 + arch/x86/entry/common.c | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/x86/kernel/signal.c | 6 + fs/exec.c | 1 + include/linux/sched.h | 68 ++ include/trace/events/rseq.h | 60 ++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/rseq.h | 85 +++ init/Kconfig | 13 + kernel/Makefile | 1 + kernel/fork.c | 2 + kernel/rseq.c | 243 +++++++ kernel/sched/core.c | 1 + kernel/sys_ni.c | 3 + tools/testing/selftests/rseq/.gitignore | 3 + tools/testing/selftests/rseq/Makefile | 13 + .../testing/selftests/rseq/basic_percpu_ops_test.c | 279 ++++++++ tools/testing/selftests/rseq/basic_test.c | 106 +++ tools/testing/selftests/rseq/param_test.c | 707 +++++++++++++++++++++ tools/testing/selftests/rseq/rseq.c | 200 ++++++ tools/testing/selftests/rseq/rseq.h | 449 +++++++++++++ 29 files changed, 2269 insertions(+) create mode 100644 include/trace/events/rseq.h create mode 100644 include/uapi/linux/rseq.h create mode 100644 kernel/rseq.c create mode 100644 tools/testing/selftests/rseq/.gitignore create mode 100644 tools/testing/selftests/rseq/Makefile create mode 100644 tools/testing/selftests/rseq/basic_percpu_ops_test.c create mode 100644 tools/testing/selftests/rseq/basic_test.c create mode 100644 tools/testing/selftests/rseq/param_test.c create mode 100644 tools/testing/selftests/rseq/rseq.c create mode 100644 tools/testing/selftests/rseq/rseq.h -- 2.1.4