login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
March
»
30
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_delegation_noreclaim() [ver #2]
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Paul E. McKenney
Subject:
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_delegation_noreclaim() [ver #2]
Date: Tuesday, March 30, 2010 - 8:40 am
On Mon, Mar 29, 2010 at 04:26:36PM -0700, Paul E. McKenney wrote:
quoted text
> On Mon, Mar 29, 2010 at 11:59:03PM +0100, David Howells wrote: > > Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote: > > > > > Only on Alpha. Otherwise only a volatile access. > > > > Whilst that is true, it's the principle of the thing. The extra barrier > > shouldn't be emitted on Alpha. If Alpha's no longer important, then can we > > scrap smp_read_barrier_depends()? > > > > My point is that some of these rcu_dereference*()'s are unnecessary. If > > there're required for correctness tracking purposes, fine; but can we have a > > macro that is just a dummy for the purpose of stripping the pointer Sparse > > annotation? One that doesn't invoke rcu_dereference_raw() and interpolate a > > barrier, pretend or otherwise, when there's no second reference to order > > against. > > Interesting point. Perhaps an rcu_dereference_update(p, c) for the > cases where the data structure cannot change. Also, such a name makes > it more clear that this is an update-side access, and it further documents > the update-side lock. > > Something like the following, then? Untested, probably does not even > compile.
Scrap this one -- Arnd has it covered, under the much better name of rcu_dereference_const(). Thanx, Paul
quoted text
> ------------------------------------------------------------------------ > > rcu: Add update-side variant of rcu_dereference() > > Upcoming consistency-checking features are requiring that even update-side > accesses to RCU-protected pointers use some variant of rcu_dereference(). > Even though rcu_dereference() is quite lightweight, it does constrain the > compiler, thus producing code that is worse than required. This patch > therefore adds rcu_dereference_update(), which allows lockdep-style > checks for holding the correct update-side lock, but which does not > constrain the compiler. > > Suggested-by: David Howells <dhowells@redhat.com> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > --- > > rcupdate.h | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h > index 872a98e..0a6047f 100644 > --- a/include/linux/rcupdate.h > +++ b/include/linux/rcupdate.h > @@ -209,9 +209,26 @@ static inline int rcu_read_lock_sched_held(void) > rcu_dereference_raw(p); \ > }) > > +/** > + * rcu_dereference_update - rcu_dereference on structure that cannot change > + * > + * Do rcu_dereference() checking, but just pick up the pointer without > + * the normal RCU read-side precautions. These precautions are only > + * needed if the data structure can change. The caller is responsible > + * for doing whatever is necessary (such as holding locks) to prevent > + * such changes from occurring. > + */ > +#define rcu_dereference_update(p, c) \ > + ({ \ > + if (debug_lockdep_rcu_enabled() && !(c)) \ > + lockdep_rcu_dereference(__FILE__, __LINE__); \ > + (p); \ > + }) > + > #else /* #ifdef CONFIG_PROVE_RCU */ > > #define rcu_dereference_check(p, c) rcu_dereference_raw(p) > +#define rcu_dereference_update(p, c) (p) > > #endif /* #else #ifdef CONFIG_PROVE_RCU */ >
--
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] NFS: Fix RCU warnings in nfs_inode_return_delegati ...
, David Howells
, (Thu Mar 18, 6:33 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Thu Mar 18, 7:25 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Mon Mar 29, 12:02 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Mon Mar 29, 12:21 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Mon Mar 29, 1:15 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Eric Dumazet
, (Mon Mar 29, 1:26 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Mon Mar 29, 2:05 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Mon Mar 29, 3:22 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Mon Mar 29, 3:36 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Mon Mar 29, 3:59 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Mon Mar 29, 4:26 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Tue Mar 30, 8:40 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Tue Mar 30, 9:37 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Tue Mar 30, 9:39 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Tue Mar 30, 9:49 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Tue Mar 30, 10:01 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Eric Dumazet
, (Tue Mar 30, 10:04 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Tue Mar 30, 10:25 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Tue Mar 30, 4:51 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Tue Mar 30, 5:08 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Wed Mar 31, 7:04 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Wed Mar 31, 8:16 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Wed Mar 31, 10:37 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Wed Mar 31, 11:30 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Eric Dumazet
, (Wed Mar 31, 11:32 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Wed Mar 31, 3:53 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Wed Mar 31, 6:29 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Thu Apr 1, 4:45 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Thu Apr 1, 7:39 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Thu Apr 1, 7:46 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Mon Apr 5, 10:57 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Tue Apr 6, 2:30 am)
[No subject]
, David Howells
, (Tue Apr 6, 9:14 am)
[No subject]
, Paul E. McKenney
, (Tue Apr 6, 10:29 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Tue Apr 6, 12:34 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Tue Apr 6, 5:02 pm)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, David Howells
, (Wed Apr 7, 6:22 am)
Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_dele ...
, Paul E. McKenney
, (Wed Apr 7, 8:57 am)
RCU condition checks
, David Howells
, (Wed Apr 7, 9:35 am)
Re: RCU condition checks
, Paul E. McKenney
, (Wed Apr 7, 10:10 am)
Re: RCU condition checks
, Trond Myklebust
, (Sun Apr 11, 3:57 pm)
Re: RCU condition checks
, Paul E. McKenney
, (Mon Apr 12, 9:47 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mel Gorman
Re: [PATCH 1/4] vmstat: remove zone->lock from walk_zones_in_node
Guenter Roeck
Re: [lm-sensors] Location for thermal drivers
David Woodhouse
Re: RFC: Moving firmware blobs out of the kernel.
Siddha, Suresh B
Re: [PATCH 2.6.21 review I] [11/25] x86: default to physical mode on hotplug CPU k...
Peter Zijlstra
Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)
git-commits-head
:
Linux Kernel Mailing List
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Linux Kernel Mailing List
USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS
Linux Kernel Mailing List
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
Linux Kernel Mailing List
[Bluetooth] Initiate authentication during connection establishment
Linux Kernel Mailing List
[POWERPC] 4xx: Add ppc40x_defconfig
linux-netdev
:
MERCEDES
Your mail id has won 950,000.00 in the MERCEDES Benz Online Promo.for claims send:
David Miller
Re: [PATCH] xen/netfront: do not mark packets of length < MSS as GSO
David Miller
Re: skb_segment() questions
Shan Wei
[RFC PATCH net-next 2/5]IPv6:netfilter: Send an ICMPv6 "Fragment Reassembly Timeou...
Stanislaw Gruszka
[PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
git
:
Nicolas Sebrecht
git-svn died of signal 11 (was "3 failures on test t9100 (svn)")
Junio C Hamano
Re: [PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
Martin Langhoff
Re: [PATCH] GIT commit statistics.
Alexandre Julliard
[PATCH] gitweb: Put back shortlog instead of graphiclog in the project list.
Josh Triplett
[PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
openbsd-misc
:
Taisto Qvist XX
Re: AMD GEODE LX-800 just works with kernel from install42.iso and kernelpanics wi...
Nico Meijer
Re: gOS Develop Kit with VIA pc-1 Processor Platform VIA C7-D
Andreas Bihlmaier
Re: jetway board sensors (Fintek F71805F)
admin
Drive a 2009 car from R799p/m
Antti Harri
Re: how to create a sha256 hash
Colocation donated by:
Syndicate