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

From
Peter Zijlstra <peterz@infradead.org>
Date
2025-02-11 10:57:38
Also in
linux-mm, lkml
Reply to
Sebastian Andrzej Siewior, 2025-02-11
On Tue, Feb 11, 2025 at 09:21:38AM +0100, Sebastian Andrzej Siewior wrote:
So with LAZY_PREEMPT (not that one that was merged upstream, its
predecessor) we had a counter similar to the preemption counter. On each
rt_spin_lock() the counter was incremented, on each rt_spin_unlock() the
counter was decremented. Once the counter hit zero and the lazy preempt
flag was set (which was only set on schedule requests by SCHED_OTHER
tasks), we scheduled.
This improved the performance as we didn't schedule() while holding a
spinlock_t and then bump into the same lock in the next task.

We don't follow this behaviour exactly today.
I think I send some hackery Mike's way to implement that at some point.

IIRC it wasn't an obvious win. Anyway its not too hard to do.
Thread (35 messages) 35 messages, 6 authors, last reply 2025-02-12
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