Re: epoll behaviour after running out of descriptors



On Sun, Nov 2, 2008 at 11:49 PM, Davide Libenzi <davidel@xxxxxxxxxxxxxxx> wrote:
At the time of the first EMFILE, you've filled up the fd space, but not
the kernel listen backlog. Additions to the backlog, triggers new events,

Shouldn't ET only fire again *after* you drained the queue? When
accept returns EMFILE, you did not drain the queue.

that you see after the first EMFILE. At a given point, the backlog is
full, so no new half connections are dropped in there, so no new events
are generated.

The backlog is 128 entries though, I don't see that many EMFILEs.

Again, sleeping on (EMFILE && ET) is bad mojo,

It's not always best to free up descriptors right away.

and nowhere is written that
events should be generated in the EMFILE->no-EMFILE transitions.

That's true, but I'm saying that this might be handy to have.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [fw-wiz] [Administrivia] Backlog, Vacations...
    ... Iv'e finally cleared the backlog of old stuff out of the queue, ... autoresponders set to not reply to messages with Precedence: ... Paul D. Robertson "My statements in this message are personal opinions ...
    (Firewall-Wizards)
  • Re: Problem with BackLog (TCP Queue)..
    ... No matter what my code does, the queue would have ... You may in fact want to increase the backlog. ... But don't expect doing so to resolve your connection problems. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Waiting on a Thread - Revisited
    ... > Messages have to be sent out synchronously, and the polling thread is ... > capable of adding messages to the queue much faster than they can be sent. ... > convenient way of preventing a backlog of messages from building up in the ... If messages are queued faster than they're going to be sent, ...
    (microsoft.public.dotnet.general)
  • Re: Waiting on a Thread - Revisited
    ... > Messages have to be sent out synchronously, and the polling thread is ... > capable of adding messages to the queue much faster than they can be sent. ... > convenient way of preventing a backlog of messages from building up in the ... If messages are queued faster than they're going to be sent, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: epoll behaviour after running out of descriptors
    ... The reason for "When accept returns EMFILE, ... is because your sockets-close logic ... At the time of the first EMFILE, you've filled up the fd space, but not ... Additions to the backlog, triggers new events, ...
    (Linux-Kernel)