Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_delegation_noreclaim() [ver #2]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Tuesday, March 30, 2010 - 10:01 am

On Tue, Mar 30, 2010 at 05:37:49PM +0100, David Howells wrote:

The main criterion is that you have to have done something to prevent
the data structure from changing, which normally only happens on the
update side.


Indeed, that is rather ugly.


Hmmm...  That sounds like something that checks the pointer for
correct format or for pointing to valid data.


What we are doing is dereferencing an RCU-protected pointer that we
are somehow preventing from being concurrently updated, usually by
holding the update-side lock.

So maybe rcu_dereference_no_updates()?  Or rcu_dereference_locked()?

But not rcu_dereference_with_concurrent_updates_somehow_prevented().  ;-)


This would work for the moment, but I do not believe that sparse can
deal with tracking rcu_write_lock() across compilation units.  Besides, I
really really don't want anything that looks like it is somehow protecting
the update.  Too many newcomers to RCU somehow get the impression that
rcu_assign_pointer() provides that protection as it is.  :-/


Indeed, the API explosion might be a bit unpleasant.  ;-)

So, how about rcu_dereference_locked()?


Given that I worked quite happily with RCU for quite some time without
any words for any of the underlying concepts, I cannot claim that I
don't need at least some help with name selection.  ;-)

							Thanx, Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
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 ..., Paul E. McKenney, (Tue Mar 30, 10:01 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 ..., Paul E. McKenney, (Wed Mar 31, 11:30 am)
[No subject], David Howells, (Tue Apr 6, 9:14 am)
[No subject], Paul E. McKenney, (Tue Apr 6, 10:29 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)