diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-17 14:46:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-01 04:46:54 -0500 |
commit | 3c7d51843b03a6839e9ec7cda724e54d2319a63a (patch) | |
tree | df8ac53451a7e519ddb0d349b24e6ba17ea18afb /include/linux/sched.h | |
parent | 1c4dd99bed5f6f70932bf8dacdd54d04a2619778 (diff) |
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: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-vw8et3445km5b8mpihf4trae@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 03dd224d0667..c628a9151437 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2082,12 +2082,20 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice; | |||
2082 | extern int rt_mutex_getprio(struct task_struct *p); | 2082 | extern int rt_mutex_getprio(struct task_struct *p); |
2083 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 2083 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
2084 | extern void rt_mutex_adjust_pi(struct task_struct *p); | 2084 | extern void rt_mutex_adjust_pi(struct task_struct *p); |
2085 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | ||
2086 | { | ||
2087 | return tsk->pi_blocked_on != NULL; | ||
2088 | } | ||
2085 | #else | 2089 | #else |
2086 | static inline int rt_mutex_getprio(struct task_struct *p) | 2090 | static inline int rt_mutex_getprio(struct task_struct *p) |
2087 | { | 2091 | { |
2088 | return p->normal_prio; | 2092 | return p->normal_prio; |
2089 | } | 2093 | } |
2090 | # define rt_mutex_adjust_pi(p) do { } while (0) | 2094 | # define rt_mutex_adjust_pi(p) do { } while (0) |
2095 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | ||
2096 | { | ||
2097 | return false; | ||
2098 | } | ||
2091 | #endif | 2099 | #endif |
2092 | 2100 | ||
2093 | extern bool yield_to(struct task_struct *p, bool preempt); | 2101 | extern bool yield_to(struct task_struct *p, bool preempt); |