🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.bugs
1 messages
1 total messages Started by bugzilla-noreply Fri, 13 Nov 2026 06:49
[Bug 300739] libsys: Add native sendmmsg/recvmmsg system calls for batched socket I/O
#443
Author: bugzilla-noreply
Date: Fri, 13 Nov 2026 06:49
51 lines
3783 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300739

            Bug ID: 300739
           Summary: libsys: Add native sendmmsg/recvmmsg system calls for
                    batched socket I/O
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: vim@vimer.org

FreeBSD currently implements sendmmsg() and recvmmsg() as user-space loops.
sendmmsg() calls __sys_sendmsg() for each message, while recvmmsg() calls
__sys_recvmsg() for each message.

Although applications can send or receive multiple messages in a single library
call, each message still requires a separate system call. These interfaces
therefore do not amortize the fixed cost of entering and leaving the kernel
across multiple datagrams.

This is particularly relevant to UDP servers handling small packets at high
packet rates. Services such as DNS and STUN typically receive one datagram and
send one reply per request. With the current implementation, successfully
processing N such requests still requires approximately 2N send/receive system
calls. Using the batching interfaces does not reduce this count.

Please consider adding native sendmmsg/recvmmsg system calls to process
multiple messages per kernel entry while maintaining compatibility with the
existing APIs. This would allow UDP servers to amortize system call overhead
across multiple datagrams.

This report is a performance enhancement request, not a correctness issue with
the existing interfaces.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads