Pull scheduler updates from Ingo Molnar: - Implement the SCHED_DEADLINE server infrastructure - Daniel Bristot de Oliveira's last major contribution to the kernel: "SCHED_DEADLINE servers can help fixing starvation issues of low priority tasks (e.g., SCHED_OTHER) when higher priority tasks monopolize CPU cycles. Today we have RT Throttling; DEADLINE servers should be able to replace and improve that." (Daniel Bristot de Oliveira, Peter Zijlstra, Joel Fernandes, Youssef Esmat, Huang Shijie) - Preparatory changes for sched_ext integration: - Use set_next_task(.first) where required - Fix up set_next_task() implementations - Clean up DL server vs. core sched - Split up put_prev_task_balance() - Rework pick_next_task() - Combine the last put_prev_task() and the first set_next_task() - Rework dl_server - Add put_prev_task(.next) (Peter Zijlstra, with a fix by Tejun Heo) - Complete the EEVDF transition and refine EEVDF scheduling: - Implement delayed dequeue - Allow shorter slices to wakeup-preempt - Use sched_attr::sched_runtime to set request/slice suggestion - Document the new feature flags - Remove unused and duplicate-functionality fields - Simplify & unify pick_next_task_fair() - Misc debuggability enhancements (Peter Zijlstra, with fixes/cleanups by Dietmar Eggemann, Valentin Schneider and Chuyi Zhou) - Initialize the vruntime of a new task when it is first enqueued, resulting in significant decrease in latency of newly woken tasks (Zhang Qiao) - Introduce SM_IDLE and an idle re-entry fast-path in __schedule() (K Prateek Nayak, Peter Zijlstra) - Clean up and clarify the usage of Clean up usage of rt_task() (Qais Yousef) - Preempt SCHED_IDLE entities in strict cgroup hierarchies (Tianchen Ding) - Clarify the documentation of time units for deadline scheduler parameters (Christian Loehle) - Remove the HZ_BW chicken-bit feature flag introduced a year ago, the original change seems to be working fine (Phil Auld) - Misc fixes and cleanups (Chen Yu, Dan Carpenter, Huang Shijie, Peilin He, Qais Yousefm and Vincent Guittot) * tag 'sched-core-2024-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits) sched/cpufreq: Use NSEC_PER_MSEC for deadline task cpufreq/cppc: Use NSEC_PER_MSEC for deadline task sched/deadline: Clarify nanoseconds in uapi sched/deadline: Convert schedtool example to chrt sched/debug: Fix the runnable tasks output sched: Fix sched_delayed vs sched_core kernel/sched: Fix util_est accounting for DELAY_DEQUEUE kthread: Fix task state in kthread worker if being frozen sched/pelt: Use rq_clock_task() for hw_pressure sched/fair: Move effective_cpu_util() and effective_cpu_util() in fair.c sched/core: Introduce SM_IDLE and an idle re-entry fast-path in __schedule() sched: Add put_prev_task(.next) sched: Rework dl_server sched: Combine the last put_prev_task() and the first set_next_task() sched: Rework pick_next_task() sched: Split up put_prev_task_balance() sched: Clean up DL server vs core sched sched: Fixup set_next_task() implementations sched: Use set_next_task(.first) where required sched/fair: Properly deactivate sched_delayed task upon class change ...
Showing the changes to kernel/locking (3 of 32 files). Show all
Unified · Split
| @@ -347,7 +347,7 @@ static __always_inline int __waiter_prio(struct task_struct *task) · 346 unmodified lines | |||
| 347 | { | 347 | { |
| 348 | int prio = task->prio; | 348 | int prio = task->prio; |
| 349 | 349 | ||
| 350 | if (!rt_prio(prio)) | 350 | if (!rt_or_dl_prio(prio)) |
| 351 | return DEFAULT_PRIO; | 351 | return DEFAULT_PRIO; |
| 352 | 352 | ||
| 353 | return prio; | 353 | return prio; |
| @@ -435,7 +435,7 @@ static inline bool rt_mutex_steal(struct rt_mutex_waiter *waiter, · 81 unmodified lines | |||
| 435 | * Note that RT tasks are excluded from same priority (lateral) | 435 | * Note that RT tasks are excluded from same priority (lateral) |
| 436 | * steals to prevent the introduction of an unbounded latency. | 436 | * steals to prevent the introduction of an unbounded latency. |
| 437 | */ | 437 | */ |
| 438 | if (rt_prio(waiter->tree.prio) || dl_prio(waiter->tree.prio)) | 438 | if (rt_or_dl_prio(waiter->tree.prio)) |
| 439 | return false; | 439 | return false; |
| 440 | 440 | ||
| 441 | return rt_waiter_node_equal(&waiter->tree, &top_waiter->tree); | 441 | return rt_waiter_node_equal(&waiter->tree, &top_waiter->tree); |
| @@ -631,7 +631,7 @@ static inline bool rwsem_try_write_lock(struct rw_semaphore *sem, · 630 unmodified lines | |||
| 631 | * if it is an RT task or wait in the wait queue | 631 | * if it is an RT task or wait in the wait queue |
| 632 | * for too long. | 632 | * for too long. |
| 633 | */ | 633 | */ |
| 634 | if (has_handoff || (!rt_task(waiter->task) && | 634 | if (has_handoff || (!rt_or_dl_task(waiter->task) && |
| 635 | !time_after(jiffies, waiter->timeout))) | 635 | !time_after(jiffies, waiter->timeout))) |
| 636 | return false; | 636 | return false; |
| 637 | 637 | ||
| @@ -914,7 +914,7 @@ static bool rwsem_optimistic_spin(struct rw_semaphore *sem) · 276 unmodified lines | |||
| 914 | if (owner_state != OWNER_WRITER) { | 914 | if (owner_state != OWNER_WRITER) { |
| 915 | if (need_resched()) | 915 | if (need_resched()) |
| 916 | break; | 916 | break; |
| 917 | if (rt_task(current) && | 917 | if (rt_or_dl_task(current) && |
| 918 | (prev_owner_state != OWNER_WRITER)) | 918 | (prev_owner_state != OWNER_WRITER)) |
| 919 | break; | 919 | break; |
| 920 | } | 920 | } |
| @@ -237,7 +237,7 @@ __ww_ctx_less(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b) · 236 unmodified lines | |||
| 237 | int a_prio = a->task->prio; | 237 | int a_prio = a->task->prio; |
| 238 | int b_prio = b->task->prio; | 238 | int b_prio = b->task->prio; |
| 239 | 239 | ||
| 240 | if (rt_prio(a_prio) || rt_prio(b_prio)) { | 240 | if (rt_or_dl_prio(a_prio) || rt_or_dl_prio(b_prio)) { |
| 241 | 241 | ||
| 242 | if (a_prio > b_prio) | 242 | if (a_prio > b_prio) |
| 243 | return true; | 243 | return true; |