Article View: muc.lists.freebsd.bugs
Article #842[Bug 301237] vn_io_fault1() calls cloneuio() unconditionally, so single-buffer regular-file reads and writes heap-allocate a uio...
From: bugzilla-noreply
Date: Sat, 28 Nov 2026 16:40
Date: Sat, 28 Nov 2026 16:40
37 lines
3970 bytes
3970 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301237 --- Comment #3 from laamalif@proton.me --- Re-tested on FreeBSD 16.0-CURRENT amd64 at origin/main (44de1df2a033), preserving the INT_MAX-bounded uiomove() loop introduced by b487aca48535. Under GENERIC-NODEBUG pinned to CPU 2 across 10 runs, cached 64-byte UFS pread(2) drops from 176.03 to 164.00 ns/op (-6.83% +/- 1.07% at 95% confidence), cached 4096-byte UFS pread(2) drops from 197.74 to 186.25 ns/op (-5.81% +/- 0.43% at 95% confidence), and the two-iovec preadv(2) control shows no difference proven at 95% confidence (225.18 vs. 226.27 ns/op). Under GENERIC with INVARIANTS and WITNESS enabled at 44de1df2a033, UFS and ZFS fault-path verification, the 3 GiB big_unmapped_read regression test, and the Kyua sys/aio and sys/vfs suites pass. In vn_io_fault1(), vn_io_fault_doio() receives only the original caller uio or the local short_uio; neither uio_clone nor small_iov is passed to filesystem callbacks. Both small_clone and small_iov[1] have function scope and remain valid through all exit paths, including the goto out cleanup path. The only operation consuming uio_clone is synchronous uiomove(NULL, len, uio_clone) under UIO_NOCOPY, while fault-retry page state is maintained separately in td->td_ma. Assigning small_clone = *uio, copying the single iovec, and redirecting small_clone.uio_iov reproduces cloneuio() copy semantics without modifying the original uio, and all UIO_USERSPACE callers provide a valid kernel-space uio_iov pointer when uio_iovcnt == 1 (as existing cloneuio() and vn_io_fault_prefault_user() already require). Multi-iovec requests retain the heap-backed cloneuio() path. -- 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-301237-227-Unb9H7OI0t@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<bug-301237-227@https.bugs.freebsd.org/bugzilla/>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!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 301237] vn_io_fault1() calls cloneuio() unconditionally, so single-buffer regular-file reads and writes heap-allocate a uio on every call Date: Sat, 28 Nov 2026 16:40:46 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-301237-227-Unb9H7OI0t@https.bugs.freebsd.org/bugzilla/> References: <bug-301237-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="84851"; 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=1795884046; 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: in-reply-to:in-reply-to:references:references; bh=FB6ngUpOIq2KfdOSGLTwW6IORD7J88yeNJz8R9LZiVI=; b=Souahau6V03ma+6NYBS7Mu6d/cC3k+60yGjvuIgw0h3CuZdbPloi5aG2o3zFFLlqJqvQ92 3F167sOwIlLOyxgeWaIU1zpwU1TDoIMGN0IOTeButsBTO838IJT+v1U2af42r4REnOkDEk jTs5TXViXZuXinDsCWwVxriEiYDt1unbzuVzyy1BH3vGB9wCS3YCpXsjK2CmKzIlGiLIGs HW6hOSkaty4+yvLHAazlOP6W65QDjN9eOeK9Sj7TYUhLW6hbSu7oy43UETuQCsnhEmdJw6 GpQnARVWURTnx7DSr9FwK4hgbg4WXwpvD17mS0UbXEHL6rqCpjUbs6hw7LCzNA== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f In-Reply-To: <bug-301237-227@https.bugs.freebsd.org/bugzilla/> Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes