Skip to contentSkip to conversation

sched: Remove rcu_read_lock/unlock() from select_idle_sibling()

PATCH In review Nikunj A. Dadhania 1 participant 2 messages Feb 17, 2012 – Feb 22, 2012 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: Remove rcu_read_lock/unlock() from select_idle_sibling()

select_idle_sibling() is called from select_task_rq_fair(), which already has the RCU read lock held.

---

 kernel/sched/fair.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
kernel/sched/fair.c +0 -4
index 4ab60a2..6ce9992 100644
@@ -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;
@@ -2693,8 +2691,6 @@ next:
 		} while (sg != sd->groups);
 	}
 done:
-	rcu_read_unlock();
-
 	return target;
 }
 
#1 lore raw
Commit-ID:  62f6536a630affe3176deb48554d27ee58b65077
Gitweb:     http://git.kernel.org/tip/62f6536a630affe3176deb48554d27ee58b65077
Author:     Nikunj A. Dadhania <[email protected]>
AuthorDate: Fri, 17 Feb 2012 08:34:30 +0530
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 22 Feb 2012 12:28:28 +0100

sched: Remove rcu_read_lock/unlock() from select_idle_sibling()

select_idle_sibling() is called from select_task_rq_fair(), which already has the RCU read lock held.

---
 kernel/sched/fair.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
kernel/sched/fair.c +0 -4
index 4ab60a2..6ce9992 100644
@@ -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;
@@ -2693,8 +2691,6 @@ next:
 		} while (sg != sd->groups);
 	}
 done:
-	rcu_read_unlock();
-
 	return target;
 }