login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
18
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code really dead
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Paul E. McKenney
Subject:
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code really dead
Date: Saturday, April 17, 2010 - 6:12 pm
On Fri, Apr 16, 2010 at 09:53:27PM -0700, Josh Triplett wrote:
quoted text
> On Fri, Apr 16, 2010 at 03:29:27PM -0700, Paul E. McKenney wrote: > > On Fri, Apr 16, 2010 at 02:16:10PM -0700, Josh Triplett wrote: > > > On Fri, Apr 16, 2010 at 07:23:48AM -0700, Paul E. McKenney wrote: > > > > On Thu, Apr 15, 2010 at 04:52:52PM -0700, Josh Triplett wrote: > > > > > On Thu, Apr 15, 2010 at 11:13:25AM -0700, Paul E. McKenney wrote: > > > > > > From: Lai Jiangshan <laijs@cn.fujitsu.com> > > > > > > > > > > > > cleanup: make dead code really dead > > > > > > > > > > > > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> > > > > > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > > > > > > --- > > > > > > kernel/rcutree.c | 4 ++-- > > > > > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/kernel/rcutree.c b/kernel/rcutree.c > > > > > > index e54c123..6042fb8 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. */ > > > > > > > > > > GCC's new __builtin_unreachable would help here, though obviously we > > > > > can't count on 4.5 or newer quite yet. A wrapper in compiler.h would > > > > > let us use it when available though. > > > > > > > > So at some time when we can count on gcc 4.5 or newer, the code > > > > would look something like the following? > > > > > > > > if (RCU_SIGNAL_INIT == RCU_SAVE_DYNTICK) > > > > this_is_unreachable(); > > > > > > Yes, exactly. > > > > > > > I suppose that in the meantime one could supply the code to use > > > > in the unreachable case: > > > > > > > > if (RCU_SIGNAL_INIT == RCU_SAVE_DYNTICK) > > > > this_is_unreachable(break); > > > > > > > > But this is beginning to seem a bit strained to me. ;-) > > > > > > I'd suggest spelling that this way: > > > > > > if (RCU_SIGNAL_INIT == RCU_SAVE_DYNTICK) { > > > unreachable(); > > > break; > > > } > > > > > > But in any case, all of these do seem excessive just to avoid the need > > > for an ifdef. :) > > > > Actually, the "if" condition is a comparison of numerical constants, > > so no #ifdef is required. > > I just meant that those constants get #defined based on CONFIG_NO_HZ, so > an #ifdef on that would remove the need for the special handling of dead > code.
True, I could put a #ifdef CONFIG_NO_HZ around that leg of the switch statement. Or am I still missing your point? Thanx, Paul --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH tip/core/rcu 0/16] rcu: v2 patches queued for 2.6.35
, Paul E. McKenney
, (Thu Apr 15, 11:12 am)
[PATCH RFC tip/core/rcu 01/16] rcu: substitute set_need_re ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 02/16] rcu: make dead code really dead
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 03/16] rcu: move some code from ma ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 04/16] rcu: ignore offline CPUs in ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 05/16] rcu: Fix bogus CONFIG_PROVE ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 06/16] rcu: fix now-bogus rcu_sche ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 07/16] rcu: shrink rcutiny by maki ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 08/16] rcu: rename rcutiny rcu_ctr ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 09/16] rcu: refactor RCU's context ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 10/16] rcu: slim down rcutiny by r ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 11/16] rcu: enable CPU_STALL_VERBO ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 12/16] rcu: disable CPU stall warn ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 13/16] rcu: print boot-time consol ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 14/16] rcu: improve RCU CPU stall- ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 15/16] rcu: permit discontiguous c ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
[PATCH RFC tip/core/rcu 16/16] rcu: v2: reduce the number ...
, Paul E. McKenney
, (Thu Apr 15, 11:13 am)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Josh Triplett
, (Thu Apr 15, 4:52 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Paul E. McKenney
, (Fri Apr 16, 7:23 am)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Josh Triplett
, (Fri Apr 16, 2:16 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Paul E. McKenney
, (Fri Apr 16, 3:29 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Josh Triplett
, (Fri Apr 16, 9:53 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Paul E. McKenney
, (Sat Apr 17, 6:12 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Josh Triplett
, (Sat Apr 17, 8:53 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Paul E. McKenney
, (Sun Apr 18, 6:42 am)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Josh Triplett
, (Sun Apr 18, 2:12 pm)
Re: [PATCH RFC tip/core/rcu 02/16] rcu: make dead code rea ...
, Paul E. McKenney
, (Sun Apr 18, 2:54 pm)
Re: [PATCH RFC tip/core/rcu 07/16] rcu: shrink rcutiny by ...
, David Howells
, (Tue Apr 20, 3:11 am)
Re: [PATCH RFC tip/core/rcu 10/16] rcu: slim down rcutiny ...
, David Howells
, (Tue Apr 20, 3:15 am)
Re: [PATCH RFC tip/core/rcu 07/16] rcu: shrink rcutiny by ...
, Paul E. McKenney
, (Tue Apr 20, 8:05 am)
Re: [PATCH RFC tip/core/rcu 10/16] rcu: slim down rcutiny ...
, Paul E. McKenney
, (Tue Apr 20, 12:18 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Uwe Kleine-König
Re: [PATCH v2] ARM: allow, but warn, when issuing ioremap() on RAM
Ingo Molnar
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Josef Bacik
[PATCH] fallocate.2: add FALLOC_FL_PUNCH_HOLE flag definition
Andrew Morton
Re: [PATCH v3 0/4] Introduce hardware spinlock framework
git
:
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Bert Wesarg
[TopGit PATCH v3 06/12] list_deps: accept -i/-w
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Petr Baudis
Re: PPC SHA-1 Updates in "pu"
git-commits-head
:
Linux Kernel Mailing List
libata: disable ATAPI AN by default
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
misc: replace remaining __FUNCTION__ with __func__
Linux Kernel Mailing List
Disallow gcc versions 4.1.{0,1}
Linux Kernel Mailing List
timer: Try to survive timer callback preempt_count leak
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Badalian Vyacheslav
Re: tc filter flow hash question
openbsd-misc
:
Boris Goldberg
Re: HP ProLiant DL320 v. Sun Fire V125
Stuart Henderson
Re: Kuro5hin: OpenBSD Founder Theo deRaadt Has Conflict of Interest With AMD
Karel Kulhavy
Re: No Blob without Puffy
Darrin Chandler
Re: strange output on openbsd C code
Nick Holland
Re: Install OpenBSD from USB ?
Colocation donated by:
Syndicate