Skip to content

Commit 1c5183a

Browse files
committed
Merge tag 'sched-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull misc scheduler fixes from Ingo Molnar: - Fix deadline scheduler sysctl parameter setting bug - Fix RT scheduler sysctl parameter setting bug - Fix possible memory corruption in child_cfs_rq_on_list() * tag 'sched-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt: Update limit of sched_rt sysctl in documentation sched/deadline: Use online cpus for validating runtime sched/fair: Fix potential memory corruption in child_cfs_rq_on_list
2 parents ab60bd5 + b153648 commit 1c5183a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Documentation/scheduler/sched-rt-group.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ The system wide settings are configured under the /proc virtual file system:
102102
* sched_rt_period_us takes values from 1 to INT_MAX.
103103
* sched_rt_runtime_us takes values from -1 to sched_rt_period_us.
104104
* A run time of -1 specifies runtime == period, ie. no limit.
105+
* sched_rt_runtime_us/sched_rt_period_us > 0.05 inorder to preserve
106+
bandwidth for fair dl_server. For accurate value check average of
107+
runtime/period in /sys/kernel/debug/sched/fair_server/cpuX/
105108

106109

107110
2.2 Default behaviour

kernel/sched/deadline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3189,7 +3189,7 @@ int sched_dl_global_validate(void)
31893189
* value smaller than the currently allocated bandwidth in
31903190
* any of the root_domains.
31913191
*/
3192-
for_each_possible_cpu(cpu) {
3192+
for_each_online_cpu(cpu) {
31933193
rcu_read_lock_sched();
31943194

31953195
if (dl_bw_visited(cpu, gen))

kernel/sched/fair.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,15 +4045,17 @@ static inline bool child_cfs_rq_on_list(struct cfs_rq *cfs_rq)
40454045
{
40464046
struct cfs_rq *prev_cfs_rq;
40474047
struct list_head *prev;
4048+
struct rq *rq = rq_of(cfs_rq);
40484049

40494050
if (cfs_rq->on_list) {
40504051
prev = cfs_rq->leaf_cfs_rq_list.prev;
40514052
} else {
4052-
struct rq *rq = rq_of(cfs_rq);
4053-
40544053
prev = rq->tmp_alone_branch;
40554054
}
40564055

4056+
if (prev == &rq->leaf_cfs_rq_list)
4057+
return false;
4058+
40574059
prev_cfs_rq = container_of(prev, struct cfs_rq, leaf_cfs_rq_list);
40584060

40594061
return (prev_cfs_rq->tg->parent == cfs_rq->tg);

0 commit comments

Comments
 (0)