Re: Socket locking

David S. Miller (davem@jenolan.rutgers.edu)
Sat, 4 Oct 1997 14:25:01 -0400


Date: Sat, 04 Oct 1997 11:53:49 -0400
From: Bill Hawes <whawes@star.net>

We already have a lock for every socket: the inode semaphore.
Could you use this to protect the socket state transitions?
Possibly this will be replaced by a read/write/update lock at some
point, but given the fine granularity just a simple semaphore
should work pretty well.

Work yes, efficient no. Semaphore's are very expensive, and they do
such more than we need for sockets, really.

Later,
David "Sparc" Miller
davem@caip.rutgers.edu