* Paul E. McKenney (paulmck@linux.vnet.ibm.com) wrote:I use acquire/release semantic with the following meaning : ... read A read_unlock() read B read_lock(); read C read_unlock would provide release semantic by disallowing read A to move after the read_unlock. read_lock would provide acquire semantic by disallowing read C to move before read_lock. read B is free to move. Yes, you are right. We could never remove _all_ memory barriers from __read_lock()/__read_unlock implementations even if we require something such as : __read_lock() smp_mb() critical section. smp_mb() __read_unlock() Because we also need to guarantee that consecutive unlock/lock won't be reordered, which implies a barrier _outside_ of the read lock/unlock atomic operations. But anyway I'm not sure it's worth trying to optimize rwlocks, given that for critical sections where the performance hit of a memory barrier would be perceivable, we should really think about using RCU rather than beating this dead horse. :) Thanks, Mathieu. -- Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 -- 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
| Andrew Morton | Re: Linux 2.6.21-rc4 |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Balbir Singh | Re: [RFC][PATCH 2/7] RSS controller core |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| Andreas Henriksson | [PATCH 06/12] Remove bogus reference to tc-filters(8) from tc(8) manpage. |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
