Loading src/socket.h +12 −2 Changes for src/socket.h: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -1200,8 +1200,18 @@ namespace netplus { // longer delegates to the parent's, so different connections on // the same listener can be processed by different threads at the // same time (see _registry_mutex below for what still needs a // shared lock, and epoll.cpp for the EPOLLONESHOT removal this // enables). Declared before _child_connections deliberately: // shared lock). NOTE: the QUIC listener fd itself is still // EPOLLONESHOT'd in epoll.cpp (and EV_ONESHOT'd in kqueue.cpp) — an // EPOLLEXCLUSIVE/no-ONESHOT variant was tried on the theory that // this per-connection mutex made it safe, measured as a 10x // throughput regression (splitting one large uncontended recvmmsg // batch into several smaller ones that then contend on a single // connection's mutex), and reverted; see epoll.cpp's comment at the // listener registration site for the full measurement. This // per-connection locking is groundwork for a future real fix (e.g. // sharding connections to dedicated threads/listener sockets, see // SO_REUSEPORT usage), not something that already removed // EPOLLONESHOT. Declared before _child_connections deliberately: // members are destroyed in reverse declaration order, and // ~quic() (run for every child when _child_connections' last // shared_ptr reference to it drops) locks quic_mtx() on itself — Loading Loading
src/socket.h +12 −2 Changes for src/socket.h: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -1200,8 +1200,18 @@ namespace netplus { // longer delegates to the parent's, so different connections on // the same listener can be processed by different threads at the // same time (see _registry_mutex below for what still needs a // shared lock, and epoll.cpp for the EPOLLONESHOT removal this // enables). Declared before _child_connections deliberately: // shared lock). NOTE: the QUIC listener fd itself is still // EPOLLONESHOT'd in epoll.cpp (and EV_ONESHOT'd in kqueue.cpp) — an // EPOLLEXCLUSIVE/no-ONESHOT variant was tried on the theory that // this per-connection mutex made it safe, measured as a 10x // throughput regression (splitting one large uncontended recvmmsg // batch into several smaller ones that then contend on a single // connection's mutex), and reverted; see epoll.cpp's comment at the // listener registration site for the full measurement. This // per-connection locking is groundwork for a future real fix (e.g. // sharding connections to dedicated threads/listener sockets, see // SO_REUSEPORT usage), not something that already removed // EPOLLONESHOT. Declared before _child_connections deliberately: // members are destroyed in reverse declaration order, and // ~quic() (run for every child when _child_connections' last // shared_ptr reference to it drops) locks quic_mtx() on itself — Loading