On Thu, Oct 07, 2010 at 10:37:54AM -0500, Steve French wrote: > > I doubt that a spinlock vs. a rwlock makes much difference, > but a rwlock lock for list insertion/removal seems more intuitive > and overloading it to also protect a counter adds complexity. > Seems more natural to leave it as an atomic counter. The rwlock here is rather non-sensical. A shared/exclusie lock only makes sense if the critical section is large enough to actually benefit from concurrency. With a short critical section like here you still pay the same price in terms of cache line effects, and operations on rwlocks actually are more expensive than on a normal spinlock. We don't actually hae a lot of places where the plain rwlock makes any sense at all - if there's enough reason for concurreny you're better off doing RCU locking anyway. -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html