diff options
-rw-r--r-- | kernel/sched/fair.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7570dd969c28..0fdb96de81a5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -6653,6 +6653,7 @@ static int idle_balance(struct rq *this_rq) | |||
6653 | int this_cpu = this_rq->cpu; | 6653 | int this_cpu = this_rq->cpu; |
6654 | 6654 | ||
6655 | idle_enter_fair(this_rq); | 6655 | idle_enter_fair(this_rq); |
6656 | |||
6656 | /* | 6657 | /* |
6657 | * We must set idle_stamp _before_ calling idle_balance(), such that we | 6658 | * We must set idle_stamp _before_ calling idle_balance(), such that we |
6658 | * measure the duration of idle_balance() as idle time. | 6659 | * measure the duration of idle_balance() as idle time. |
@@ -6705,14 +6706,16 @@ static int idle_balance(struct rq *this_rq) | |||
6705 | 6706 | ||
6706 | raw_spin_lock(&this_rq->lock); | 6707 | raw_spin_lock(&this_rq->lock); |
6707 | 6708 | ||
6709 | if (curr_cost > this_rq->max_idle_balance_cost) | ||
6710 | this_rq->max_idle_balance_cost = curr_cost; | ||
6711 | |||
6708 | /* | 6712 | /* |
6709 | * While browsing the domains, we released the rq lock. | 6713 | * While browsing the domains, we released the rq lock, a task could |
6710 | * A task could have be enqueued in the meantime | 6714 | * have been enqueued in the meantime. Since we're not going idle, |
6715 | * pretend we pulled a task. | ||
6711 | */ | 6716 | */ |
6712 | if (this_rq->cfs.h_nr_running && !pulled_task) { | 6717 | if (this_rq->cfs.h_nr_running && !pulled_task) |
6713 | pulled_task = 1; | 6718 | pulled_task = 1; |
6714 | goto out; | ||
6715 | } | ||
6716 | 6719 | ||
6717 | if (pulled_task || time_after(jiffies, this_rq->next_balance)) { | 6720 | if (pulled_task || time_after(jiffies, this_rq->next_balance)) { |
6718 | /* | 6721 | /* |
@@ -6722,9 +6725,6 @@ static int idle_balance(struct rq *this_rq) | |||
6722 | this_rq->next_balance = next_balance; | 6725 | this_rq->next_balance = next_balance; |
6723 | } | 6726 | } |
6724 | 6727 | ||
6725 | if (curr_cost > this_rq->max_idle_balance_cost) | ||
6726 | this_rq->max_idle_balance_cost = curr_cost; | ||
6727 | |||
6728 | out: | 6728 | out: |
6729 | /* Is there a task of a high priority class? */ | 6729 | /* Is there a task of a high priority class? */ |
6730 | if (this_rq->nr_running != this_rq->cfs.h_nr_running && | 6730 | if (this_rq->nr_running != this_rq->cfs.h_nr_running && |