Repository navigation
net: report accept queue overruns at most every few seconds - #2195
Open
AngeloRubens wants to merge 1 commit into
Open
AngeloRubens wants to merge 1 commit into
AngeloRubens wants to merge 1 commit into
Conversation
accept_tcp_from_lwip() prints one line for every connection it refuses because the queue of the listening socket is full. The console is synchronous: console_write() takes a global spinlock and the serial driver waits on the transmitter for each character. Under a burst of connections that is thousands of serial writes on the network input path, from every CPU, at the moment the system is already overloaded, and it turns an overload into a stall. Count the refusals and print at most one line every five seconds, with the number refused since the previous one.
AngeloRubens
force-pushed
the
net-accept-overrun-ratelimit
branch
from
October 5, 2026 07:28
393f261 to
ca2d574
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
accept_tcp_from_lwip()prints one line for every connection it refuses because the queue of the listening socket is full. The console is synchronous:console_write()takes a global spinlock and the PL011 driver waits on the transmitter for every character. Under a burst of connections that means thousands of serial writes on the network input path, from every CPU, while the system is already overloaded, and the overload turns into a stall.This counts the refusals and prints at most one line every five seconds, with the number refused since the previous one.
On an OCI aarch64 instance (2 vCPU) serving a Java application at 1,000-2,000 connections, consoles held 18,000-21,000 of these lines, and some 15-s load passes served almost nothing. With the report rate-limited (together with #2193), no pass stalled in 192 passes up to 2,000 connections. Details in #2194.