Skip to contentSkip to conversation

sched: add __rcu annotation

PATCH In review Lai Jiangshan 3 participants 4 messages Jan 4, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 sched: add __rcu annotation

Add __rcu annotation to :

	(struct rq)->sd

---

kernel/sched.c +1 -1
index 5ec0615..d23b706 100644
@@ -500,7 +500,7 @@ struct rq {
 
 #ifdef CONFIG_SMP
 	struct root_domain *rd;
-	struct sched_domain *sd;
+	struct sched_domain __rcu *sd;
 
 	unsigned long cpu_power;
 
#1 lore raw
Quoted 2 lines · Lai Jiangshan

Add __rcu annotation to :

	(struct rq)->sd

That's a broken changelog, it's about as good as:

i++; /* increment i */

I'm really starting to detest sparse (lock annotations), it keeps adding these annotations, but does it ever catch an actual bug?

#2 lore raw
Quoted 2 lines · Peter Zijlstra

I'm really starting to detest sparse (lock annotations), it keeps adding these annotations, but does it ever catch an actual bug?

Actually I caught at least one bug in networking (FIB code ?) thanks to these __rcu annotations ;)

Cannot remember the exact bug, sorry ;)

#3 lore raw
Quoted 9 lines · Eric Dumazet
Quoted 2 lines · Peter Zijlstra

I'm really starting to detest sparse (lock annotations), it keeps adding these annotations, but does it ever catch an actual bug?

Actually I caught at least one bug in networking (FIB code ?) thanks to these __rcu annotations ;)

Cannot remember the exact bug, sorry ;)

Ah, ok.. then they're not completely pointless. Lai, can you resend with a slightly better changelog?