Re: more tcpdumpinfo for nfs3 problem: aix-server --- linux 2.4.15pre5 client

Trond Myklebust (trond.myklebust@fys.uio.no)
Mon, 19 Nov 2001 20:29:09 +0100


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

> I do no think this was right, to be honest. write_space with
> udp is too hairy thing to use it correctly. :-) Anyway, it is
> enough to select right sndbuf. Right is... well, default value
> is right. :-)

The sndbuf is by default 64k, so that should indeed suffice to fit all
the possible varieties of NFS datagram.

The problem is that when EAGAIN is returned by sendmsg, we want to put
the RPC request to sleep (and have rpciod deal with other pending
requests), and then reactivate it as soon as sock_wspace() reports
that the available free buffer space is large enough to fit the next
request.

Assuming that sock_wfree() always gets called whenever an skb is
released and that sock_wspace() does indeed reflect more or less the
maximum message size for which there is free buffer space (I allow a
couple of kilobytes for extra padding) then the current UDP code
should be correct and race-free.

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/