|
@@ -2104,21 +2104,20 @@ balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
|
|
enum cpu_idle_type idle, int *all_pinned,
|
|
enum cpu_idle_type idle, int *all_pinned,
|
|
int *this_best_prio, struct cfs_rq *busiest_cfs_rq)
|
|
int *this_best_prio, struct cfs_rq *busiest_cfs_rq)
|
|
{
|
|
{
|
|
- int loops = 0, pulled = 0, pinned = 0;
|
|
|
|
|
|
+ int loops = 0, pulled = 0;
|
|
long rem_load_move = max_load_move;
|
|
long rem_load_move = max_load_move;
|
|
struct task_struct *p, *n;
|
|
struct task_struct *p, *n;
|
|
|
|
|
|
if (max_load_move == 0)
|
|
if (max_load_move == 0)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
- pinned = 1;
|
|
|
|
-
|
|
|
|
list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) {
|
|
list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) {
|
|
if (loops++ > sysctl_sched_nr_migrate)
|
|
if (loops++ > sysctl_sched_nr_migrate)
|
|
break;
|
|
break;
|
|
|
|
|
|
if ((p->se.load.weight >> 1) > rem_load_move ||
|
|
if ((p->se.load.weight >> 1) > rem_load_move ||
|
|
- !can_migrate_task(p, busiest, this_cpu, sd, idle, &pinned))
|
|
|
|
|
|
+ !can_migrate_task(p, busiest, this_cpu, sd, idle,
|
|
|
|
+ all_pinned))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
pull_task(busiest, p, this_rq, this_cpu);
|
|
pull_task(busiest, p, this_rq, this_cpu);
|
|
@@ -2153,9 +2152,6 @@ out:
|
|
*/
|
|
*/
|
|
schedstat_add(sd, lb_gained[idle], pulled);
|
|
schedstat_add(sd, lb_gained[idle], pulled);
|
|
|
|
|
|
- if (all_pinned)
|
|
|
|
- *all_pinned = pinned;
|
|
|
|
-
|
|
|
|
return max_load_move - rem_load_move;
|
|
return max_load_move - rem_load_move;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3341,6 +3337,7 @@ redo:
|
|
* still unbalanced. ld_moved simply stays zero, so it is
|
|
* still unbalanced. ld_moved simply stays zero, so it is
|
|
* correctly treated as an imbalance.
|
|
* correctly treated as an imbalance.
|
|
*/
|
|
*/
|
|
|
|
+ all_pinned = 1;
|
|
local_irq_save(flags);
|
|
local_irq_save(flags);
|
|
double_rq_lock(this_rq, busiest);
|
|
double_rq_lock(this_rq, busiest);
|
|
ld_moved = move_tasks(this_rq, this_cpu, busiest,
|
|
ld_moved = move_tasks(this_rq, this_cpu, busiest,
|