Re: socket read() vs. recv() serialization

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 24 Sep 1998 15:25:42 +0100 (BST)


> are serialized by means of the socket's inode semaphore. But concurrent
> calls of recv(), recvfrom(), or recvmsg() are not serialized. The same
> holds for write() vs. send(), sendto(), or sendmsg().
>
> Is this intentional or is it a bug (which might in theory cause some trouble,
> i.e. when concurrent threads try to send() large chunks to the same socket)?

The network layer supports its own serialization. The inode lock is a right
royal pain in the arse, and breaks some programs which want to get reliable
timeouts. It also causes problems with tty stuff and fifo/pipe stuff. Ted
has put some stuff in for fifo/pipe/tty. Networking remains to be investigated
and Linus persuaded to merge the fixes

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/