Re: [PATCH]rcu,inet,fib_trie,route,radix-tree,DECnet,mac80211: fix meaningless rcu_dereference(local_var)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Monday, June 23, 2008 - 3:01 am

On Mon, Jun 23, 2008 at 01:35:52PM +0800, Lai Jiangshan wrote:

One caution...  smp_read_barrier_depends() makes for difficult-to-read
code.  After a few years and patches to surrounding code, it becomes
quite difficult to figure out what the smp_read_barrier_depends() is
constraining.

I very strongly recommend using rcu_dereference() instead.  Especially
since rcu_dereference() is extremely lightweight on almost all machines
available today -- there aren't that many DEC Alphas running Linux,
from what I understand.


On all but Alpha, it is quite possible that rcu_dereference() is cheaper
than a conditional branch.  ;-)

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

Messages in current thread:
Re: [PATCH]rcu,inet,fib_trie,route,radix-tree,DECnet,mac80 ..., Paul E. McKenney, (Mon Jun 23, 3:01 am)