From 3738c891d2a076e8aef689c91e9d9f0e8282a09d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 20:46:52 +0200 Subject: [PATCH] --- yaml --- r: 288755 b: refs/heads/master c: 3c7d51843b03a6839e9ec7cda724e54d2319a63a h: refs/heads/master i: 288753: 9534b0c583ab93443848a9b9e19ab490e536f25e 288751: b9a20c8b0c30002a5855d120b6029d1c043c1df2 v: v3 --- [refs] | 2 +- trunk/include/linux/sched.h | 8 ++++++++ trunk/kernel/sched/core.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 7d37f9a09060..33c05a5e34d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c4dd99bed5f6f70932bf8dacdd54d04a2619778 +refs/heads/master: 3c7d51843b03a6839e9ec7cda724e54d2319a63a diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index 03dd224d0667..c628a9151437 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -2082,12 +2082,20 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice; extern int rt_mutex_getprio(struct task_struct *p); extern void rt_mutex_setprio(struct task_struct *p, int prio); 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 static inline int rt_mutex_getprio(struct task_struct *p) { return p->normal_prio; } # define rt_mutex_adjust_pi(p) do { } while (0) +static inline bool tsk_is_pi_blocked(struct task_struct *tsk) +{ + return false; +} #endif extern bool yield_to(struct task_struct *p, bool preempt); diff --git a/trunk/kernel/sched/core.c b/trunk/kernel/sched/core.c index c2bbdecaa27d..25e06a5e048b 100644 --- a/trunk/kernel/sched/core.c +++ b/trunk/kernel/sched/core.c @@ -3227,7 +3227,7 @@ static void __sched __schedule(void) static inline void sched_submit_work(struct task_struct *tsk) { - if (!tsk->state) + if (!tsk->state || tsk_is_pi_blocked(tsk)) return; /* * If we are going to sleep and we have plugged IO queued,