|
@@ -1497,7 +1497,7 @@ static void task_numa_placement(struct task_struct *p)
|
|
/* If the task is part of a group prevent parallel updates to group stats */
|
|
/* If the task is part of a group prevent parallel updates to group stats */
|
|
if (p->numa_group) {
|
|
if (p->numa_group) {
|
|
group_lock = &p->numa_group->lock;
|
|
group_lock = &p->numa_group->lock;
|
|
- spin_lock(group_lock);
|
|
|
|
|
|
+ spin_lock_irq(group_lock);
|
|
}
|
|
}
|
|
|
|
|
|
/* Find the node with the highest number of faults */
|
|
/* Find the node with the highest number of faults */
|
|
@@ -1572,7 +1572,7 @@ static void task_numa_placement(struct task_struct *p)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- spin_unlock(group_lock);
|
|
|
|
|
|
+ spin_unlock_irq(group_lock);
|
|
}
|
|
}
|
|
|
|
|
|
/* Preferred node as the node with the most faults */
|
|
/* Preferred node as the node with the most faults */
|
|
@@ -1677,7 +1677,8 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags,
|
|
if (!join)
|
|
if (!join)
|
|
return;
|
|
return;
|
|
|
|
|
|
- double_lock(&my_grp->lock, &grp->lock);
|
|
|
|
|
|
+ BUG_ON(irqs_disabled());
|
|
|
|
+ double_lock_irq(&my_grp->lock, &grp->lock);
|
|
|
|
|
|
for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++) {
|
|
for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++) {
|
|
my_grp->faults[i] -= p->numa_faults_memory[i];
|
|
my_grp->faults[i] -= p->numa_faults_memory[i];
|
|
@@ -1691,7 +1692,7 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags,
|
|
grp->nr_tasks++;
|
|
grp->nr_tasks++;
|
|
|
|
|
|
spin_unlock(&my_grp->lock);
|
|
spin_unlock(&my_grp->lock);
|
|
- spin_unlock(&grp->lock);
|
|
|
|
|
|
+ spin_unlock_irq(&grp->lock);
|
|
|
|
|
|
rcu_assign_pointer(p->numa_group, grp);
|
|
rcu_assign_pointer(p->numa_group, grp);
|
|
|
|
|
|
@@ -1710,14 +1711,14 @@ void task_numa_free(struct task_struct *p)
|
|
void *numa_faults = p->numa_faults_memory;
|
|
void *numa_faults = p->numa_faults_memory;
|
|
|
|
|
|
if (grp) {
|
|
if (grp) {
|
|
- spin_lock(&grp->lock);
|
|
|
|
|
|
+ spin_lock_irq(&grp->lock);
|
|
for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++)
|
|
for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++)
|
|
grp->faults[i] -= p->numa_faults_memory[i];
|
|
grp->faults[i] -= p->numa_faults_memory[i];
|
|
grp->total_faults -= p->total_numa_faults;
|
|
grp->total_faults -= p->total_numa_faults;
|
|
|
|
|
|
list_del(&p->numa_entry);
|
|
list_del(&p->numa_entry);
|
|
grp->nr_tasks--;
|
|
grp->nr_tasks--;
|
|
- spin_unlock(&grp->lock);
|
|
|
|
|
|
+ spin_unlock_irq(&grp->lock);
|
|
rcu_assign_pointer(p->numa_group, NULL);
|
|
rcu_assign_pointer(p->numa_group, NULL);
|
|
put_numa_group(grp);
|
|
put_numa_group(grp);
|
|
}
|
|
}
|
|
@@ -6727,7 +6728,8 @@ static int idle_balance(struct rq *this_rq)
|
|
out:
|
|
out:
|
|
/* Is there a task of a high priority class? */
|
|
/* Is there a task of a high priority class? */
|
|
if (this_rq->nr_running != this_rq->cfs.h_nr_running &&
|
|
if (this_rq->nr_running != this_rq->cfs.h_nr_running &&
|
|
- (this_rq->dl.dl_nr_running ||
|
|
|
|
|
|
+ ((this_rq->stop && this_rq->stop->on_rq) ||
|
|
|
|
+ this_rq->dl.dl_nr_running ||
|
|
(this_rq->rt.rt_nr_running && !rt_rq_throttled(&this_rq->rt))))
|
|
(this_rq->rt.rt_nr_running && !rt_rq_throttled(&this_rq->rt))))
|
|
pulled_task = -1;
|
|
pulled_task = -1;
|
|
|
|
|