public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] sched: add __rcu annotation
@ 2011-01-04  8:06 Lai Jiangshan
  2011-01-04 10:17 ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Lai Jiangshan @ 2011-01-04  8:06 UTC (permalink / raw)
  To: Ingo Molnar, Paul E. McKenney, Arnd Bergmann, Peter Zijlstra,
	LKML

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;
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] sched: add __rcu annotation
  2011-01-04  8:06 [PATCH 1/3] sched: add __rcu annotation Lai Jiangshan
@ 2011-01-04 10:17 ` Peter Zijlstra
  2011-01-04 10:55   ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2011-01-04 10:17 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, Paul E. McKenney, Arnd Bergmann, LKML

On Tue, 2011-01-04 at 16:06 +0800, Lai Jiangshan wrote:
> 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] sched: add __rcu annotation
  2011-01-04 10:17 ` Peter Zijlstra
@ 2011-01-04 10:55   ` Eric Dumazet
  2011-01-04 11:01     ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2011-01-04 10:55 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Lai Jiangshan, Ingo Molnar, Paul E. McKenney, Arnd Bergmann, LKML

Le mardi 04 janvier 2011 à 11:17 +0100, Peter Zijlstra a écrit :

> 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 ;)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] sched: add __rcu annotation
  2011-01-04 10:55   ` Eric Dumazet
@ 2011-01-04 11:01     ` Peter Zijlstra
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2011-01-04 11:01 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Lai Jiangshan, Ingo Molnar, Paul E. McKenney, Arnd Bergmann, LKML

On Tue, 2011-01-04 at 11:55 +0100, Eric Dumazet wrote:
> Le mardi 04 janvier 2011 à 11:17 +0100, Peter Zijlstra a écrit :
> 
> > 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-04 11:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04  8:06 [PATCH 1/3] sched: add __rcu annotation Lai Jiangshan
2011-01-04 10:17 ` Peter Zijlstra
2011-01-04 10:55   ` Eric Dumazet
2011-01-04 11:01     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox