Re: POSIX aio vs completion ports

Richard Gooch (rgooch@ras.ucalgary.ca)
Mon, 13 Sep 1999 15:15:11 -0600


Steve Underwood writes:
> Completion ports have one substantial benefit over the POSIX RT
> signal queues - they will never overflow. Messy, and ultimately
> somewhat futile, schemes for recovering from overflows are
> unnecessary. It seems to me that any recovery is going to be slow,
> and maybe a little unpredictable. This will be happening at a very
> busy time (otherwise there wouldn't have been an overflow), so
> clumsy recoveries just won't cut it.

Fundamentally, this is just a matter of allocating sufficient buffer
space. If you experience an overflow, increase the buffer space.

And if you think about it, you'll realise that completion ports have
the same problem, just pushed back a bit. If for each event you have
to allocate an entry in the queue, your allocation may either:
- fail due to insufficient resources
- block until resources are available.

The former case is just like Linux RT signal queues. The latter means
the problem is pushed deeper into the networking code. If you block,
you're going to have trouble receiving new packets, because you're
already in a low-memory situation. Hence you start dropping packets.

So you have the choice of dropping notification events (with a safe
recovery method), or you can drop data. I know which I'd prefer...

Regards,

Richard....
Old: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

-
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/