Skip to content

Commit dcbb4a1

Browse files
committed
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Thomas Gleixner: "Three fixlets for the scheduler: - Avoid double bandwidth accounting in the push & pull code - Use a sane FIFO priority for the Pressure Stall Information (PSI) thread. - Avoid permission checks when setting the scheduler params for the PSI thread" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/psi: Do not require setsched permission from the trigger creator sched/psi: Reduce psimon FIFO priority sched/deadline: Fix double accounting of rq/running bw in push & pull
2 parents ed254bb + 04e048c commit dcbb4a1

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

kernel/sched/deadline.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,17 +2088,13 @@ static int push_dl_task(struct rq *rq)
20882088
}
20892089

20902090
deactivate_task(rq, next_task, 0);
2091-
sub_running_bw(&next_task->dl, &rq->dl);
2092-
sub_rq_bw(&next_task->dl, &rq->dl);
20932091
set_task_cpu(next_task, later_rq->cpu);
2094-
add_rq_bw(&next_task->dl, &later_rq->dl);
20952092

20962093
/*
20972094
* Update the later_rq clock here, because the clock is used
20982095
* by the cpufreq_update_util() inside __add_running_bw().
20992096
*/
21002097
update_rq_clock(later_rq);
2101-
add_running_bw(&next_task->dl, &later_rq->dl);
21022098
activate_task(later_rq, next_task, ENQUEUE_NOCLOCK);
21032099
ret = 1;
21042100

@@ -2186,11 +2182,7 @@ static void pull_dl_task(struct rq *this_rq)
21862182
resched = true;
21872183

21882184
deactivate_task(src_rq, p, 0);
2189-
sub_running_bw(&p->dl, &src_rq->dl);
2190-
sub_rq_bw(&p->dl, &src_rq->dl);
21912185
set_task_cpu(p, this_cpu);
2192-
add_rq_bw(&p->dl, &this_rq->dl);
2193-
add_running_bw(&p->dl, &this_rq->dl);
21942186
activate_task(this_rq, p, 0);
21952187
dmin = p->dl.deadline;
21962188

kernel/sched/psi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group,
10511051

10521052
if (!rcu_access_pointer(group->poll_kworker)) {
10531053
struct sched_param param = {
1054-
.sched_priority = MAX_RT_PRIO - 1,
1054+
.sched_priority = 1,
10551055
};
10561056
struct kthread_worker *kworker;
10571057

@@ -1061,7 +1061,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group,
10611061
mutex_unlock(&group->trigger_lock);
10621062
return ERR_CAST(kworker);
10631063
}
1064-
sched_setscheduler(kworker->task, SCHED_FIFO, &param);
1064+
sched_setscheduler_nocheck(kworker->task, SCHED_FIFO, &param);
10651065
kthread_init_delayed_work(&group->poll_work,
10661066
psi_poll_work);
10671067
rcu_assign_pointer(group->poll_kworker, kworker);

0 commit comments

Comments
 (0)