login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
16
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: Friday, April 16, 2010 - 3:29 pm
On Fri, Apr 16, 2010 at 02:16:10PM -0700, Josh Triplett wrote:
quoted text
> 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. 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
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 041/196] kobject: add kobject_init_and_add function
Lukas Hejtmanek
Re: Another libata error related to OCZ SSD
Greg Kroah-Hartman
[PATCH 023/196] MCP_UCB1200: Convert from class_device to device
Florian Fainelli
Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade
Christoph Lameter
[patch 1/4] mmu_notifier: Core code
git
:
Johannes Schindelin
Re: [PATCH 1/2] Add strbuf_initf()
John Bito
[EGIT] Push to GitHub caused corruption
Jakub Narebski
Re: [PATCH 0/2] gitweb: patch view
Junio C Hamano
Re: [PATCH] When a remote is added but not fetched, tell the user.
Andy Parkins
Re: [RFC] Submodules in GIT
git-commits-head
:
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Linux Kernel Mailing List
V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
Linux Kernel Mailing List
ceph: client types
Linux Kernel Mailing List
ceph: on-wire types
Linux Kernel Mailing List
crypto: chainiv - Use kcrypto_wq instead of keventd_wq
linux-netdev
:
Andrew Morton
Re: [Bugme-new] [Bug 14969] New: b44: WOL does not work in suspended state
Giuseppe CAVALLARO
Re: [PATCH 03/13] stmmac: add the new Header file for stmmac platform data
Taku Izumi
[PATCH 3/3] ixgbe: add registers etc. printout code just before resetting adapters
Eric Dumazet
rps: some comments
Thomas Gleixner
Re: [RFC PATCH 02/12] On Tue, 23 Sep 2008, David Miller wrote:
openbsd-misc
:
Stephan Andreas
problems with login after xlock in OpenBSD release 4.7
pmc
Make A Change. Alcoholism and Drug Addiction Treatment
ropers
Re: what exactly is enc0?
Fuad NAHDI
Re: What does your environment look like?
Matthew Szudzik
Typo on OpenBSD 4.4 CD Set
Colocation donated by:
Syndicate