[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251116173423.031443519@linutronix.de>
Date: Sun, 16 Nov 2025 21:51:05 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Boqun Feng <boqun.feng@...il.com>,
Jonathan Corbet <corbet@....net>,
Prakash Sangappa <prakash.sangappa@...cle.com>,
Madadi Vineeth Reddy <vineethr@...ux.ibm.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Arnd Bergmann <arnd@...db.de>,
linux-arch@...r.kernel.org,
Randy Dunlap <rdunlap@...radead.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: [patch V4 00/12] rseq: Implement time slice extension mechanism
This is a follow up on the V3 version:
https://lore.kernel.org/20251029125514.496134233@linutronix.de
V1 contains a detailed explanation:
https://lore.kernel.org/20250908225709.144709889@linutronix.de
TLDR: Time slice extensions are an attempt to provide opportunistic
priority ceiling without the overhead of an actual priority ceiling
protocol, but also without the guarantees such a protocol provides.
The intent is to avoid situations where a user space thread is interrupted
in a critical section and scheduled out, while holding a resource on which
the preempting thread or other threads in the system might block on. That
obviously prevents those threads from making progress in the worst case for
at least a full time slice. Especially in the context of user space
spinlocks, which are a patently bad idea to begin with, but that's also
true for other mechanisms.
This series uses the existing RSEQ user memory to implement it.
Changes vs. V3:
- Rebase on the newest uaccess, RSEQ and CID changes
- Make the example code correct - Prakash
- Update comment - Steven
- Finally get the __setup() nonsense right - Randy
- Picked up Reviewed/Acked-by tags where appropriate
The CID modifications on which this series is based on can be found here:
https://lore.kernel.org/20251104075053.700034556@linutronix.de
and in git:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git rseq/cid
For your convenience all of it is also available as a conglomerate from
git:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git rseq/slice
Thanks,
tglx
---
Documentation/admin-guide/kernel-parameters.txt | 5
Documentation/admin-guide/sysctl/kernel.rst | 6
Documentation/userspace-api/index.rst | 1
Documentation/userspace-api/rseq.rst | 119 +++++++++
arch/alpha/kernel/syscalls/syscall.tbl | 1
arch/arm/tools/syscall.tbl | 1
arch/arm64/tools/syscall_32.tbl | 1
arch/m68k/kernel/syscalls/syscall.tbl | 1
arch/microblaze/kernel/syscalls/syscall.tbl | 1
arch/mips/kernel/syscalls/syscall_n32.tbl | 1
arch/mips/kernel/syscalls/syscall_n64.tbl | 1
arch/mips/kernel/syscalls/syscall_o32.tbl | 1
arch/parisc/kernel/syscalls/syscall.tbl | 1
arch/powerpc/kernel/syscalls/syscall.tbl | 1
arch/s390/kernel/syscalls/syscall.tbl | 1
arch/s390/mm/pfault.c | 3
arch/sh/kernel/syscalls/syscall.tbl | 1
arch/sparc/kernel/syscalls/syscall.tbl | 1
arch/x86/entry/syscalls/syscall_32.tbl | 1
arch/x86/entry/syscalls/syscall_64.tbl | 1
arch/xtensa/kernel/syscalls/syscall.tbl | 1
include/linux/entry-common.h | 2
include/linux/rseq.h | 11
include/linux/rseq_entry.h | 191 ++++++++++++++-
include/linux/rseq_types.h | 30 ++
include/linux/sched.h | 7
include/linux/syscalls.h | 1
include/linux/thread_info.h | 16 -
include/uapi/asm-generic/unistd.h | 5
include/uapi/linux/prctl.h | 10
include/uapi/linux/rseq.h | 38 +++
init/Kconfig | 12
kernel/entry/common.c | 14 -
kernel/entry/syscall-common.c | 11
kernel/rcu/tiny.c | 8
kernel/rcu/tree.c | 14 -
kernel/rcu/tree_exp.h | 3
kernel/rcu/tree_plugin.h | 9
kernel/rcu/tree_stall.h | 3
kernel/rseq.c | 299 ++++++++++++++++++++++++
kernel/sys.c | 6
kernel/sys_ni.c | 1
scripts/syscall.tbl | 1
tools/testing/selftests/rseq/.gitignore | 1
tools/testing/selftests/rseq/Makefile | 5
tools/testing/selftests/rseq/rseq-abi.h | 27 ++
tools/testing/selftests/rseq/slice_test.c | 198 +++++++++++++++
47 files changed, 1020 insertions(+), 53 deletions(-)
Powered by blists - more mailing lists