Re: [RFC][PATCH 1/2] sched: Extended scheduler time slice

From
Steven Rostedt <rostedt@goodmis.org>
Date
2025-02-02 03:26:29
Also in
linux-mm, lkml
Reply to
Linus Torvalds, 2025-02-01
On Sat, 1 Feb 2025 15:35:53 -0800
Linus Torvalds [off-list ref] wrote:
I didn't actually check what current active schedulers do.  I would
not be in the least surprised if different schedulers end up having
very different behavior (particularly any RT scheduler).
The only real use of sched yield() I have ever seen in practice was in
a RT application where all tasks were given the same RT FIFO priority,
and the application would use the yield() system call to trigger the
next task.

That's also the only use case that really does have a strict defined
behavior for yield(). In SCHED_FIFO, as the name suggests, tasks run in
a first-in first-out order. yield() will put the task at the end of
that queue. You can use this method to implement a strict application
defined scheduler.

-- Steve.
Thread (29 messages) 29 messages, 6 authors, last reply 2025-02-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help