public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: make dead code really dead
@ 2010-03-28  3:15 Lai Jiangshan
  2010-03-28  3:48 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2010-03-28  3:15 UTC (permalink / raw)
  To: Paul E. McKenney, Ingo Molnar, LKML


cleanup: make dead code really dead

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index e6014e1..1947c4e 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1236,11 +1236,11 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
 		break; /* grace period idle or initializing, ignore. */
 
 	case RCU_SAVE_DYNTICK:
-
-		raw_spin_unlock(&rnp->lock);  /* irqs remain disabled */
 		if (RCU_SIGNAL_INIT != RCU_SAVE_DYNTICK)
 			break; /* So gcc recognizes the dead code. */
 
+		raw_spin_unlock(&rnp->lock);  /* irqs remain disabled */
+
 		/* Record dyntick-idle state. */
 		force_qs_rnp(rsp, dyntick_save_progress_counter);
 		raw_spin_lock(&rnp->lock);  /* irqs already disabled */


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

* Re: [PATCH] rcu: make dead code really dead
  2010-03-28  3:15 [PATCH] rcu: make dead code really dead Lai Jiangshan
@ 2010-03-28  3:48 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2010-03-28  3:48 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, LKML

On Sun, Mar 28, 2010 at 11:15:20AM +0800, Lai Jiangshan wrote:
> 
> cleanup: make dead code really dead

Good catch!  I have queued this one up for RCU for 2.6.35.

							Thanx, Paul

> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index e6014e1..1947c4e 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1236,11 +1236,11 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
>  		break; /* grace period idle or initializing, ignore. */
> 
>  	case RCU_SAVE_DYNTICK:
> -
> -		raw_spin_unlock(&rnp->lock);  /* irqs remain disabled */
>  		if (RCU_SIGNAL_INIT != RCU_SAVE_DYNTICK)
>  			break; /* So gcc recognizes the dead code. */
> 
> +		raw_spin_unlock(&rnp->lock);  /* irqs remain disabled */
> +
>  		/* Record dyntick-idle state. */
>  		force_qs_rnp(rsp, dyntick_save_progress_counter);
>  		raw_spin_lock(&rnp->lock);  /* irqs already disabled */
> 

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

end of thread, other threads:[~2010-03-28  3:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28  3:15 [PATCH] rcu: make dead code really dead Lai Jiangshan
2010-03-28  3:48 ` Paul E. McKenney

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