summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-12-20 14:13:49 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:37:43 (GMT)
commitea01c1c0674d501a94f39de226e151c718c2169e (patch)
tree75d19689b71ed6c65bc6120ca542cabaaac9f6d7 /include/linux
parente5201599c58dfa402501c91cd61ccc685f8ee424 (diff)
downloadlinux-fsl-qoriq-ea01c1c0674d501a94f39de226e151c718c2169e.tar.xz
sched: Consider pi boosting in setscheduler
If a PI boosted task policy/priority is modified by a setscheduler() call we unconditionally dequeue and requeue the task if it is on the runqueue even if the new priority is lower than the current effective boosted priority. This can result in undesired reordering of the priority bucket list. If the new priority is less or equal than the current effective we just store the new parameters in the task struct and leave the scheduler class and the runqueue untouched. This is handled when the task deboosts itself. Only if the new priority is higher than the effective boosted priority we apply the change immediately. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched/rt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h
index 440434d..4d54d6c 100644
--- a/include/linux/sched/rt.h
+++ b/include/linux/sched/rt.h
@@ -35,6 +35,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 void rt_mutex_adjust_pi(struct task_struct *p);
static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
{
@@ -45,6 +46,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)
+{
+ return 0;
+}
# define rt_mutex_adjust_pi(p) do { } while (0)
static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
{