On Mon, 19 Feb 2024 18:56:47 +1100
David Gibson <david(a)gibson.dropbear.id.au> wrote:
Currently tcp_sock_refill_pool() stops as soon as
it finds an entry in the
pool with a valid fd. This appears to makes sense: we always use fds from
the front of the pool, so if we find a filled one, the rest of the pool
should be filled as well.
However, that's not quite correct. If a previous refill hit errors trying
to open new sockets, it could leave gaps between blocks of valid fds. We're
going to add some changes that could make that more likely.
Uh oh, good catch, I didn't think of the possibility that with 3/6 we
could otherwise stop in the middle of a block of "empty" slots, with
filled slots occurring after them.
Right. The consequences aren't particularly dire if we get this
wrong: we don't fill the pool as full as we should, but we should
still have fds to work with.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!