From d7a5da7a0f7fa7ff081140c4f6f971db98882703 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 15 Dec 2025 17:52:04 +0100 Subject: rseq: Add fields and constants for time slice extension Aside of a Kconfig knob add the following items: - Two flag bits for the rseq user space ABI, which allow user space to query the availability and enablement without a syscall. - A new member to the user space ABI struct rseq, which is going to be used to communicate request and grant between kernel and user space. - A rseq state struct to hold the kernel state of this - Documentation of the new mechanism Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20251215155708.669472597@linutronix.de --- init/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'init') diff --git a/init/Kconfig b/init/Kconfig index fa79feb8fe57..00c6fbb66a5a 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1938,6 +1938,18 @@ config RSEQ If unsure, say Y. +config RSEQ_SLICE_EXTENSION + bool "Enable rseq-based time slice extension mechanism" + depends on RSEQ && HIGH_RES_TIMERS && GENERIC_ENTRY && HAVE_GENERIC_TIF_BITS + help + Allows userspace to request a limited time slice extension when + returning from an interrupt to user space via the RSEQ shared + data ABI. If granted, that allows to complete a critical section, + so that other threads are not stuck on a conflicted resource, + while the task is scheduled out. + + If unsure, say N. + config RSEQ_STATS default n bool "Enable lightweight statistics of restartable sequences" if EXPERT -- cgit v1.2.3 From 377521af0341083bc9d196cf021ec7265dc47c20 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 22 Jan 2026 09:52:23 +0100 Subject: sched: remove task_struct->faults_disabled_mapping This reverts commit 2b69987be575 ("sched: Add task_struct->faults_disabled_mapping"), which added this field without review or maintainer signoff. With bcachefs removed from the tree it is also unused now. Signed-off-by: Christoph Hellwig Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260122085223.487092-1-hch@lst.de --- include/linux/sched.h | 1 - init/init_task.c | 1 - 2 files changed, 2 deletions(-) (limited to 'init') diff --git a/include/linux/sched.h b/include/linux/sched.h index bf96a7d595e2..71654e33bdbe 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -955,7 +955,6 @@ struct task_struct { struct mm_struct *mm; struct mm_struct *active_mm; - struct address_space *faults_disabled_mapping; int exit_state; int exit_code; diff --git a/init/init_task.c b/init/init_task.c index 49b13d7c3985..7d9094ae8eab 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -113,7 +113,6 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = { .nr_cpus_allowed= NR_CPUS, .mm = NULL, .active_mm = &init_mm, - .faults_disabled_mapping = NULL, .restart_block = { .fn = do_no_restart_syscall, }, -- cgit v1.2.3