On Tue, Apr 21, 2009 at 09:13:52AM -0700, Linus Torvalds wrote:
I believe that at least some of this is naming...
[ . . . ]
Sigh!!!
Part of the problem is that back in 1971, Courtois, Heymans, and Parnas
foolishly named their article "Concurrent Control with 'Readers' and
'Writers'", which lead to the name "reader-writer lock". This started
really biting around 1991, when Hsieh and Weihl created a reader-optimized
lock similar to brlock, but with each of the per-CPU locks being
exclusive rather than each being an rwlock.
The problem was that Hsieh's and Weihl's lock was more than just
a reader-writer lock. It could also be used (and -was- used) as a
local/global lock, where for example you acquire your own lock to make
local changes, and acquire all of the locks to obtain a consistent view
of global state. In which case, you would read-acquire the lock in
order to write, and write-acquire the lock in order to read. Blech.
So, would it help if the function names names in this patch said something
about "local" and "global" rather than "read" and "write"?
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