On Fri, Apr 17, 2009 at 08:12:14AM +0200, Peter Zijlstra wrote:
This is the call_rcu_sched() variant.
This is the call_rcu() variant.
I guess that this one could allow sleeping on mutexes... Does anyone
need to do that?
#3 would be good! But...
At an API level, there are two differences between SRCU and the other
RCU implementations:
a. The return value from srcu_read_lock() is passed to
srcu_read_unlock().
b. There is a control block passed in to each SRCU primitive.
Difference (a) could potentially be taken care of with a few tricks I
am trying in the process of getting preemptrcu merged into treercu.
Your approach to (b) certainly makes it uniform, there are >500
occurrences of rcu_read_lock() and rcu_read_unlock() each, but only
a very few occurrences of srcu_read_lock() and srcu_read_unlock()
(like exactly one each!). So adding an argument to rcu_read_lock()
does not sound at all reasonable.
I am thinking in terms of adding a synchronize_rcu_bh() with the desired
properties. That way we avoid yet another RCU flavor. (What can I say?
I got carried away!) Also, since the rcu-bh flavor is used only by
networking, we have a fair amount of freedom to tweak it. It will take
longer than introducing a new flavor, but Steve Hemminger has a good
solution already, and RCU really isn't the thing to do quick hacks on.
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html