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
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ray Lee
Re: New thread RDSL, post-2.6.20 kernels and amanda (tar) miss-fires
Alan Cox
Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)
Tejun Heo
Re: your mail
Werner Cornelius
Serial USB-driver for Winchiphead CH340/41 chip
Ingo Molnar
Re: [patch] e1000=y && e1000e=m regression fix
git
:
Bill Lear
cpio command not found
Gary Yang
fatal: did you run git update-server-info on the server? mv post-update.sample pos...
Ben Schmidt
Getting the path right for git over SSH
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Laflen, Brandon (GE, Research)
RE: fatal: Unable to find remote helper for 'http'
linux-netdev
:
Stephen Hemminger
Re: vlan JMicron Technologies, Inc. JMC250 PCI Express Gigabit Ethernet
Sage Weil
Re: [2/3] POHMELFS: Documentation.
Patrick McHardy
Re: [ANNOUNCE]: First release of nftables
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
Sage Weil
Re: [2/3] POHMELFS: Documentation.
openbsd-misc
:
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Ted Unangst
Re: OpenSMTPd actual development and integration
Paul M
Corrupted RAIDFrame device
nixlists
Re: OpenSMTPd actual development and integration
noreply
Rowiw újraindult!
git-commits-head
:
Linux Kernel Mailing List
Remove empty comment in acpi/power.c
Linux Kernel Mailing List
Linux 2.6.34-rc4
Linux Kernel Mailing List
ALSA: cosmetic: make hda intel interrupt name consistent with others
Linux Kernel Mailing List
swiotlb: replace architecture-specific swiotlb.h with linux/swiotlb.h
Linux Kernel Mailing List
x86 boot: only pick up additional EFI memmap if add_efi_memmap flag
Colocation donated by:
Syndicate