Skip to content

Commit

Permalink
sched: Remove rcu_read_lock/unlock() from select_idle_sibling()
Browse files Browse the repository at this point in the history
select_idle_sibling() is called from select_task_rq_fair(), which
already has the RCU read lock held.

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120217030409.11748.12491.stgit@abhimanyu
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Nikunj A. Dadhania authored and Ingo Molnar committed Feb 22, 2012
1 parent 9388dc3 commit 62f6536
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -2670,8 +2670,6 @@ static int select_idle_sibling(struct task_struct *p, int target)
/*
* Otherwise, iterate the domains and find an elegible idle cpu.
*/
rcu_read_lock();

sd = rcu_dereference(per_cpu(sd_llc, target));
for_each_lower_domain(sd) {
sg = sd->groups;
Expand All @@ -2693,8 +2691,6 @@ static int select_idle_sibling(struct task_struct *p, int target)
} while (sg != sd->groups);
}
done:
rcu_read_unlock();

return target;
}

Expand Down

0 comments on commit 62f6536

Please sign in to comment.