[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3bc50dd8-d115-4516-8a21-8313a57f1b40@app.fastmail.com>
Date: Sun, 16 Nov 2025 22:51:42 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Thomas Gleixner" <tglx@...utronix.de>,
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>,
Linux-Arch <linux-arch@...r.kernel.org>,
"Randy Dunlap" <rdunlap@...radead.org>,
"Peter Zijlstra" <peterz@...radead.org>,
"Christian Brauner" <brauner@...nel.org>
Subject: Re: [patch V4 06/12] rseq: Implement sys_rseq_slice_yield()
On Sun, Nov 16, 2025, at 21:51, Thomas Gleixner wrote:
> Provide a new syscall which has the only purpose to yield the CPU after the
> kernel granted a time slice extension.
>
> sched_yield() is not suitable for that because it unconditionally
> schedules, but the end of the time slice extension is not required to
> schedule when the task was already preempted. This also allows to have a
> strict check for termination to catch user space invoking random syscalls
> including sched_yield() from a time slice extension region.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: linux-arch@...r.kernel.org
> ---
> V2: Use the proper name in sys_ni.c and add comment - Prateek
I checked that the syscalls are well-formed across
all architectures, which is easy here, since there
are no arguments.
Acked-by: Arnd Bergmann <arnd@...db.de>
Two minor comments:
- Number 470 is also used in Christian Brauner's listns
series. Obviously only one of you can claim that number.
> +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl
> @@ -408,3 +408,4 @@
> 467 n32 open_tree_attr sys_open_tree_attr
> 468 n32 file_getattr sys_file_getattr
> 469 n32 file_setattr sys_file_setattr
> +470 common rseq_slice_yield sys_rseq_slice_yield
> --- a/arch/mips/kernel/syscalls/syscall_n64.tbl
> +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl
> @@ -384,3 +384,4 @@
> 467 n64 open_tree_attr sys_open_tree_attr
> 468 n64 file_getattr sys_file_getattr
> 469 n64 file_setattr sys_file_setattr
> +470 common rseq_slice_yield sys_rseq_slice_yield
> --- a/arch/mips/kernel/syscalls/syscall_o32.tbl
> +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
> @@ -457,3 +457,4 @@
> 467 o32 open_tree_attr sys_open_tree_attr
> 468 o32 file_getattr sys_file_getattr
> 469 o32 file_setattr sys_file_setattr
> +470 common rseq_slice_yield sys_rseq_slice_yield
- These should probably all become 'common' eventually, especially
now that the s390 compat syscalls are out of the way, I would like
to revisit my series that unifies the tables for syscalls over
402 into a single source file. Until then, it's probably less
confusing to keep the format and use n32/n64/o32 here.
Arnd
Powered by blists - more mailing lists