Re: [NFS] NFSD over TCP: TCP broken?

Trond Myklebust (trond.myklebust@fys.uio.no)
17 Oct 2001 20:38:31 +0200


>>>>> " " == kuznet <kuznet@ms2.inr.ac.ru> writes:

> Hello!
>> where the interleaving gets in.

> I do not think that you diagnosed the problem correctly. nfsd
> used non blocking io and write to tcp is strictly atomic in
> this case.

Some of the patches that attempted to fix the nfsd server code relied
on making the TCP stuff blocking. I've seen several such patches
floating around that ignore the fact that the socket lock is dropped
when the IPV4 socket code sleeps.

In any case, even with nonblocking TCP, one has to protect the socket
until the entire message has been sent. Otherwise we risk seeing
another thread racing for the socket while we're doing whatever needs
to be done to clear the -EAGAIN.

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