Article View: muc.lists.freebsd.bugs
Article #443[Bug 300739] libsys: Add native sendmmsg/recvmmsg system calls for batched socket I/O
From: bugzilla-noreply
Date: Fri, 13 Nov 2026 06:49
Date: Fri, 13 Nov 2026 06:49
51 lines
3783 bytes
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
Technical Details
Message-ID:
<bug-300739-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 300739] libsys: Add native sendmmsg/recvmmsg system calls for batched socket I/O Date: Fri, 13 Nov 2026 06:49:05 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-300739-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="52049"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794552545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xXMjWdTVZriMZ76aHeADw8wiKQNRUOLf0/0COkh8T18=; b=vr1IlR8k6Iineb8uUvFgFBCFadHh2F57izJZqBxKnFlBPu/M8wqrDaKrRNd49tAFNiTF1c g9si1zgjdTe4eQn9i1Zev1SHWOovacw0FCHyly5HTredYqzcplJ68t79jjm5ikdjwrmk4k 6lYY75SDijQkxtUJZ7h3bv6sOYD+zJ3t1VGskGVF38jCEixMHO/Cugp8cKK0RZIoUYrvED Ui9Jt/s0iqeKkGjPTi2gBcCqlGNbFkatwaxYd4IsjCg7eXnjWbnHmgzasBGS+PRvomuu1C wS2V96qtwerM4070ipU9tMqvWI715ZprS/jc1BJboCnL+M0tJzhxBJE7mQE+KA== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes