mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Gleixner" <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Cc: "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Prakash Sangappa" <prakash.sangappa@oracle.com>,
	"Madadi Vineeth Reddy" <vineethr@linux.ibm.com>,
	"K Prateek Nayak" <kprateek.nayak@amd.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Christian Brauner" <brauner@kernel.org>
Subject: Re: [patch V4 06/12] rseq: Implement sys_rseq_slice_yield()
Date: Sun, 16 Nov 2025 22:51:42 +0100	[thread overview]
Message-ID: <3bc50dd8-d115-4516-8a21-8313a57f1b40@app.fastmail.com> (raw)
In-Reply-To: <20251116174750.984829834@linutronix.de>

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@linutronix.de>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arch@vger.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@arndb.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

  reply	other threads:[~2025-11-16 21:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-16 20:51 [patch V4 00/12] rseq: Implement time slice extension mechanism Thomas Gleixner
2025-11-16 20:51 ` [patch V4 01/12] sched: Provide and use set_need_resched_current() Thomas Gleixner
2025-11-20 21:29   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2025-11-16 20:51 ` [patch V4 02/12] rseq: Add fields and constants for time slice extension Thomas Gleixner
2025-11-16 20:51 ` [patch V4 03/12] rseq: Provide static branch for time slice extensions Thomas Gleixner
2025-11-16 20:51 ` [patch V4 04/12] rseq: Add statistics " Thomas Gleixner
2025-11-16 20:51 ` [patch V4 05/12] rseq: Add prctl() to enable " Thomas Gleixner
2025-11-16 20:51 ` [patch V4 06/12] rseq: Implement sys_rseq_slice_yield() Thomas Gleixner
2025-11-16 21:51   ` Arnd Bergmann [this message]
2025-11-16 20:51 ` [patch V4 07/12] rseq: Implement syscall entry work for time slice extensions Thomas Gleixner
2025-11-16 20:51 ` [patch V4 08/12] rseq: Implement time slice extension enforcement timer Thomas Gleixner
2025-11-16 23:23   ` Hillf Danton
2025-11-16 20:51 ` [patch V4 09/12] rseq: Reset slice extension when scheduled Thomas Gleixner
2025-11-16 20:51 ` [patch V4 10/12] rseq: Implement rseq_grant_slice_extension() Thomas Gleixner
2025-11-16 20:51 ` [patch V4 11/12] entry: Hook up rseq time slice extension Thomas Gleixner
2025-11-16 20:51 ` [patch V4 12/12] selftests/rseq: Implement time slice extension test Thomas Gleixner
2025-11-24  7:10 ` [patch V4 00/12] rseq: Implement time slice extension mechanism K Prateek Nayak
2025-11-24 10:33   ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bc50dd8-d115-4516-8a21-8313a57f1b40@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=brauner@kernel.org \
    --cc=corbet@lwn.net \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=prakash.sangappa@oracle.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vineethr@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®