scheduler fixes
Subsystems (2)
Linus,
Please pull the latest sched-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-for-linus
# HEAD: 533445c6e53368569e50ab3fb712230c03d523f3 sched/core: Fix regression in cpuset_cpu_inactive() for suspend
Two fixes: a suspend/resume related regression fix, and an RT priority boosting fix.
Thanks,
Ingo
------------------>
Omar Sandoval (1):
sched/core: Fix regression in cpuset_cpu_inactive() for suspend
Thomas Gleixner (1):
sched: Handle priority boosted tasks proper in setscheduler()
include/linux/sched/rt.h | 7 ++++--- kernel/locking/rtmutex.c | 12 ++++++----- kernel/sched/core.c | 54 +++++++++++++++++++++++------------------------- 3 files changed, 37 insertions(+), 36 deletions(-)
include/linux/sched/rt.h +4 -3
@@ -18,7 +18,7 @@ static inline int rt_task(struct task_struct *p)#ifdef CONFIG_RT_MUTEXES extern int rt_mutex_getprio (struct task_struct *p);extern void rt_mutex_setprio (struct task_struct *p,int prio); -extern int rt_mutex_check_prio (struct task_struct *task,int newprio); +extern int rt_mutex_get_effective_prio (struct task_struct *task,int newprio);extern struct task_struct *rt_mutex_get_top_task (struct task_struct *task);extern void rt_mutex_adjust_pi (struct task_struct *p);static inline bool tsk_is_pi_blocked (struct task_struct *tsk)
@@ -31,9 +31,10 @@ static inline int rt_mutex_getprio(struct task_struct *p)return p->normal_prio; } -static inline int rt_mutex_check_prio (struct task_struct *task,int newprio) +static inline int rt_mutex_get_effective_prio (struct task_struct *task, +int newprio) { -return 0 ; +return newprio; }static inline struct task_struct *rt_mutex_get_top_task (struct task_struct *task)
kernel/locking/rtmutex.c +7 -5
@@ -265,15 +265,17 @@ struct task_struct *rt_mutex_get_top_task(struct task_struct *task) }/* -* Called by sched_setscheduler() to check whether the priority change -* is overruled by a possible priority boosting. +* Called by sched_setscheduler() to get the priority which will be +* effective after the change. */ -int rt_mutex_check_prio (struct task_struct *task,int newprio) +int rt_mutex_get_effective_prio (struct task_struct *task,int newprio) {if (!task_has_pi_waiters (task)) -return 0 ; +return newprio; -return task_top_pi_waiter (task)->task->prio <= newprio; +if (task_top_pi_waiter (task)->task->prio <= newprio) +return task_top_pi_waiter (task)->task->prio; +return newprio; }/*
kernel/sched/core.c +26 -28
104 lines not on this page · raw message