Re: Socket locking

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


Date: Sat, 04 Oct 1997 13:37:58 -0400
From: Bill Hawes <whawes@star.net>

Alan Cox wrote:
> Is the inode semaphore interrupt safe ?

It's a MUTEX, so it's supposed to be interrupt safe. On the other hand,
we probably don't want code running in an interrupt context to be
blocked by a semaphore. This may make it tricky to determine what uses
should be protected by the semaphore ..

One solution is to move the actual processing (as Alan mentioned) into
kernel threads, which can block since they run outside of interrupt
processing.

But I really don't like this, mainly because the semaphores are so
expensive. I'd rather have a generic rwlock implementation first, and
this has been discussed for other things already, so they will indeed
be worth the effort of implementing them.

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