Re: select for UNIX sockets?

Krzysztof Halasa
2003-06-11T21:50:43Z

"David Schwartz" <davids@webmaster.com> writes:

> Looks like another receive queue to me. There is no send queue and you
> wouldn't want there to be one.

So?

> They have device queues, they have no socket send queues.

Well?

> > Having no per-sender socket queue for UDP/IP is totally irrelevant here.
>
> It is relevent. Because when you select for write, you're trying to
> find
> out whether there's space to write to the socket.

Which socket? IP/UDP or UNIX one? You know, UNIX sockets are a little
special - both ends are on the same machine. This is why the sending
routine can check the receiving queue length.

> That would require there
> to be something for there to be space in or not to be space in. Whatever you
> want to call that (I call it a 'socket send queue', but it doesn't matter)
> that queue doesn't exist for UDP and you wouldn't want it to exist.

Sure.

> With UDP, or any connectionless protocol, the application is ultimately
> responsible for transmit pacing.

Still, this is all irrelevant, this is a kernel-only issue.

> You could argue that it would be nice if
> the kernel helped out more than it currently does, but it has no obligation
> to do so.

You're missing the fact that the kernel _has_ code to help but this
_existing_ code is broken (and yes, it was fine in earlier kernels).
--
Krzysztof Halasa
Network Administrator