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
Unified · Split
| @@ -2088,17 +2088,13 @@ retry: · 2087 unmodified lines | ||
| 2088 | 2088 | } |
| 2089 | 2089 | |
| 2090 | 2090 | deactivate_task(rq, next_task, 0); |
| 2091 | − sub_running_bw(&next_task->dl, &rq->dl); | |
| 2092 | − sub_rq_bw(&next_task->dl, &rq->dl); | |
| 2093 | 2091 | set_task_cpu(next_task, later_rq->cpu); |
| 2094 | − add_rq_bw(&next_task->dl, &later_rq->dl); | |
| 2095 | 2092 | |
| 2096 | 2093 | /* |
| 2097 | 2094 | * Update the later_rq clock here, because the clock is used |
| 2098 | 2095 | * by the cpufreq_update_util() inside __add_running_bw(). |
| 2099 | 2096 | */ |
| 2100 | 2097 | update_rq_clock(later_rq); |
| 2101 | − add_running_bw(&next_task->dl, &later_rq->dl); | |
| 2102 | 2098 | activate_task(later_rq, next_task, ENQUEUE_NOCLOCK); |
| 2103 | 2099 | ret = 1; |
| 2104 | 2100 | |
| @@ -2186,11 +2182,7 @@ static void pull_dl_task(struct rq *this_rq) · 81 unmodified lines | ||
| 2186 | 2182 | resched = true; |
| 2187 | 2183 | |
| 2188 | 2184 | deactivate_task(src_rq, p, 0); |
| 2189 | − sub_running_bw(&p->dl, &src_rq->dl); | |
| 2190 | − sub_rq_bw(&p->dl, &src_rq->dl); | |
| 2191 | 2185 | set_task_cpu(p, this_cpu); |
| 2192 | − add_rq_bw(&p->dl, &this_rq->dl); | |
| 2193 | − add_running_bw(&p->dl, &this_rq->dl); | |
| 2194 | 2186 | activate_task(this_rq, p, 0); |
| 2195 | 2187 | dmin = p->dl.deadline; |
| 2196 | 2188 | |
| @@ -1051,7 +1051,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group, · 1050 unmodified lines | ||
| 1051 | 1051 | |
| 1052 | 1052 | if (!rcu_access_pointer(group->poll_kworker)) { |
| 1053 | 1053 | struct sched_param param = { |
| 1054 | − .sched_priority = MAX_RT_PRIO - 1, | |
| 1054 | + .sched_priority = 1, | |
| 1055 | 1055 | }; |
| 1056 | 1056 | struct kthread_worker *kworker; |
| 1057 | 1057 | |
| @@ -1061,7 +1061,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group, · 3 unmodified lines | ||
| 1061 | 1061 | mutex_unlock(&group->trigger_lock); |
| 1062 | 1062 | return ERR_CAST(kworker); |
| 1063 | 1063 | } |
| 1064 | − sched_setscheduler(kworker->task, SCHED_FIFO, ¶m); | |
| 1064 | + sched_setscheduler_nocheck(kworker->task, SCHED_FIFO, ¶m); | |
| 1065 | 1065 | kthread_init_delayed_work(&group->poll_work, |
| 1066 | 1066 | psi_poll_work); |
| 1067 | 1067 | rcu_assign_pointer(group->poll_kworker, kworker); |