aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 6185fa080ec8..97cab609fc31 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1952,6 +1952,8 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)
1952 prev_state = prev->state; 1952 prev_state = prev->state;
1953 finish_arch_switch(prev); 1953 finish_arch_switch(prev);
1954 finish_lock_switch(rq, prev); 1954 finish_lock_switch(rq, prev);
1955 schedule_tail_balance_rt(rq);
1956
1955 fire_sched_in_preempt_notifiers(current); 1957 fire_sched_in_preempt_notifiers(current);
1956 if (mm) 1958 if (mm)
1957 mmdrop(mm); 1959 mmdrop(mm);
@@ -2185,11 +2187,13 @@ static void double_rq_unlock(struct rq *rq1, struct rq *rq2)
2185/* 2187/*
2186 * double_lock_balance - lock the busiest runqueue, this_rq is locked already. 2188 * double_lock_balance - lock the busiest runqueue, this_rq is locked already.
2187 */ 2189 */
2188static void double_lock_balance(struct rq *this_rq, struct rq *busiest) 2190static int double_lock_balance(struct rq *this_rq, struct rq *busiest)
2189 __releases(this_rq->lock) 2191 __releases(this_rq->lock)
2190 __acquires(busiest->lock) 2192 __acquires(busiest->lock)
2191 __acquires(this_rq->lock) 2193 __acquires(this_rq->lock)
2192{ 2194{
2195 int ret = 0;
2196
2193 if (unlikely(!irqs_disabled())) { 2197 if (unlikely(!irqs_disabled())) {
2194 /* printk() doesn't work good under rq->lock */ 2198 /* printk() doesn't work good under rq->lock */
2195 spin_unlock(&this_rq->lock); 2199 spin_unlock(&this_rq->lock);
@@ -2200,9 +2204,11 @@ static void double_lock_balance(struct rq *this_rq, struct rq *busiest)
2200 spin_unlock(&this_rq->lock); 2204 spin_unlock(&this_rq->lock);
2201 spin_lock(&busiest->lock); 2205 spin_lock(&busiest->lock);
2202 spin_lock(&this_rq->lock); 2206 spin_lock(&this_rq->lock);
2207 ret = 1;
2203 } else 2208 } else
2204 spin_lock(&busiest->lock); 2209 spin_lock(&busiest->lock);
2205 } 2210 }
2211 return ret;
2206} 2212}
2207 2213
2208/* 2214/*