Commit 3c7d5184 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

sched/rt: Do not submit new work when PI-blocked

When we are PI-blocked then we want to get things done ASAP.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-vw8et3445km5b8mpihf4trae@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1c4dd99b
...@@ -2082,12 +2082,20 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice; ...@@ -2082,12 +2082,20 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice;
extern int rt_mutex_getprio(struct task_struct *p); extern int rt_mutex_getprio(struct task_struct *p);
extern void rt_mutex_setprio(struct task_struct *p, int prio); extern void rt_mutex_setprio(struct task_struct *p, int prio);
extern void rt_mutex_adjust_pi(struct task_struct *p); extern void rt_mutex_adjust_pi(struct task_struct *p);
static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
{
return tsk->pi_blocked_on != NULL;
}
#else #else
static inline int rt_mutex_getprio(struct task_struct *p) static inline int rt_mutex_getprio(struct task_struct *p)
{ {
return p->normal_prio; return p->normal_prio;
} }
# define rt_mutex_adjust_pi(p) do { } while (0) # define rt_mutex_adjust_pi(p) do { } while (0)
static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
{
return false;
}
#endif #endif
extern bool yield_to(struct task_struct *p, bool preempt); extern bool yield_to(struct task_struct *p, bool preempt);
......
...@@ -3227,7 +3227,7 @@ static void __sched __schedule(void) ...@@ -3227,7 +3227,7 @@ static void __sched __schedule(void)
static inline void sched_submit_work(struct task_struct *tsk) static inline void sched_submit_work(struct task_struct *tsk)
{ {
if (!tsk->state) if (!tsk->state || tsk_is_pi_blocked(tsk))
return; return;
/* /*
* If we are going to sleep and we have plugged IO queued, * If we are going to sleep and we have plugged IO queued,
......
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