Commit dcbb4a15 authored by Linus Torvalds's avatar Linus Torvalds

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
parents ed254bb5 04e048cf
...@@ -2088,17 +2088,13 @@ static int push_dl_task(struct rq *rq) ...@@ -2088,17 +2088,13 @@ static int push_dl_task(struct rq *rq)
} }
deactivate_task(rq, next_task, 0); deactivate_task(rq, next_task, 0);
sub_running_bw(&next_task->dl, &rq->dl);
sub_rq_bw(&next_task->dl, &rq->dl);
set_task_cpu(next_task, later_rq->cpu); set_task_cpu(next_task, later_rq->cpu);
add_rq_bw(&next_task->dl, &later_rq->dl);
/* /*
* Update the later_rq clock here, because the clock is used * Update the later_rq clock here, because the clock is used
* by the cpufreq_update_util() inside __add_running_bw(). * by the cpufreq_update_util() inside __add_running_bw().
*/ */
update_rq_clock(later_rq); update_rq_clock(later_rq);
add_running_bw(&next_task->dl, &later_rq->dl);
activate_task(later_rq, next_task, ENQUEUE_NOCLOCK); activate_task(later_rq, next_task, ENQUEUE_NOCLOCK);
ret = 1; ret = 1;
...@@ -2186,11 +2182,7 @@ static void pull_dl_task(struct rq *this_rq) ...@@ -2186,11 +2182,7 @@ static void pull_dl_task(struct rq *this_rq)
resched = true; resched = true;
deactivate_task(src_rq, p, 0); deactivate_task(src_rq, p, 0);
sub_running_bw(&p->dl, &src_rq->dl);
sub_rq_bw(&p->dl, &src_rq->dl);
set_task_cpu(p, this_cpu); set_task_cpu(p, this_cpu);
add_rq_bw(&p->dl, &this_rq->dl);
add_running_bw(&p->dl, &this_rq->dl);
activate_task(this_rq, p, 0); activate_task(this_rq, p, 0);
dmin = p->dl.deadline; dmin = p->dl.deadline;
......
...@@ -1051,7 +1051,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group, ...@@ -1051,7 +1051,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group,
if (!rcu_access_pointer(group->poll_kworker)) { if (!rcu_access_pointer(group->poll_kworker)) {
struct sched_param param = { struct sched_param param = {
.sched_priority = MAX_RT_PRIO - 1, .sched_priority = 1,
}; };
struct kthread_worker *kworker; struct kthread_worker *kworker;
...@@ -1061,7 +1061,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group, ...@@ -1061,7 +1061,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group,
mutex_unlock(&group->trigger_lock); mutex_unlock(&group->trigger_lock);
return ERR_CAST(kworker); return ERR_CAST(kworker);
} }
sched_setscheduler(kworker->task, SCHED_FIFO, &param); sched_setscheduler_nocheck(kworker->task, SCHED_FIFO, &param);
kthread_init_delayed_work(&group->poll_work, kthread_init_delayed_work(&group->poll_work,
psi_poll_work); psi_poll_work);
rcu_assign_pointer(group->poll_kworker, kworker); rcu_assign_pointer(group->poll_kworker, kworker);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment