Re: [PATCH 1/3] sched: add __rcu annotation

Previous thread: Kernel build by Anca Emanuel on Tuesday, January 4, 2011 - 12:59 am. (6 messages)

Next thread: [PATCH 3/3] kvm: add __rcu annotations by Lai Jiangshan on Tuesday, January 4, 2011 - 1:06 am. (1 message)
From: Lai Jiangshan
Date: Tuesday, January 4, 2011 - 1:06 am

Add __rcu annotation to :
	(struct rq)->sd

signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/sched.c b/kernel/sched.c
index 5ec0615..d23b706 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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;
 
--

From: Peter Zijlstra
Date: Tuesday, January 4, 2011 - 3:17 am

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?
--

From: Eric Dumazet
Date: Tuesday, January 4, 2011 - 3:55 am

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

Cannot remember the exact bug, sorry ;)


--

From: Peter Zijlstra
Date: Tuesday, January 4, 2011 - 4:01 am

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

Previous thread: Kernel build by Anca Emanuel on Tuesday, January 4, 2011 - 12:59 am. (6 messages)

Next thread: [PATCH 3/3] kvm: add __rcu annotations by Lai Jiangshan on Tuesday, January 4, 2011 - 1:06 am. (1 message)