Linux 7.2 Improves Anonymous Pipe Performance for Shell Pipelines and More

Bender1 pts0 comments

Linux 7.2 Improves Anonymous/Unnamed Pipe Performance For Shell Pipelines & More - Phoronix

Articles & Reviews

News Archive

Forums

Premium Ad-Free<br>Contact

Popular Categories

Close

Articles & Reviews

News Archive

Forums

Premium

Contact

Categories

Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals

Linux 7.2 Improves Anonymous/Unnamed Pipe Performance For Shell Pipelines & More

Written by Michael Larabel in Linux Kernel on 16 June 2026 at 01:05 PM EDT. Add A Comment

Yet another performance optimization merged for the in-development Linux 7.2 kernel is improving the speed of anon_pipe_write, the kernel function used for writing data into anonymous/unnamed pipes such as when using shell pipelines or standard streams from applications.

Breno Leitao of Meta was profiling some of their caching code and found pipe to mutex contention in a hot path, which is now resolved by the newly-merged code to pre-allocate outside the lock for avoiding contention.

In the VFS misc pull request that situation is described as:<br>"anon_pipe_write() called alloc_page() once per page while holding pipe->mutex. The allocation can sleep doing direct reclaim and runs memcg charging, which extends the critical section and stalls any concurrent reader on the same mutex. Now up to 8 pages are pre-allocated before the mutex is taken, leftovers are recycled into the per-pipe tmp_page[] cache before unlock, and any remainder is released after unlock, keeping the allocator out of the critical section on both sides. On a writers x readers sweep with 64KB writes against a 1 MB pipe throughput improves 6-28% and average write latency drops 5-22%; under memory pressure - when the cost of holding the mutex across reclaim is highest - throughput improves 21-48% and latency drops 17-33%. The microbenchmark is added to selftests."

Very nice gains. More of the numbers in detail can be found via this patch cover letter by Breno Leitao.

That work is now merged for Linux 7.2.

Add A Comment

Tweet

Linux 7.2 Continues Removing Old i486 Code Remnants, Adds Rugged Panther Lake<br>Cache Aware Scheduling Merged For Linux 7.2 For Boosting Modern Intel & AMD CPUs<br>Linux 7.2 Introducing The Rust Zerocopy Library To Eliminate More "Unsafe" Code<br>Linux 7.2 To Raise LLVM/Clang Compiler Requirement, Add Support For Distributed ThinLTO<br>Linux 7.1 Released: New NTFS Driver, Intel FRED For Panther Lake, Faster Arc Graphics<br>Linux 7.2 Features Expected: Apple M3, Initial AMDGPU HDMI 2.1 FRL, USB4STREAM, Cache Aware Scheduling

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Arch Linux Now Believes Malware Incident Under Control: More Than 1,500 Affected Packages<br>ReactOS "Open-Source Windows" Reaches The Milestone Of Being Able To Run Half-Life<br>macOS 27 Beta Breaks The Ability To Boot Asahi Linux<br>Arch Linux's AUR Sees More Than 400 Packages Compromised With Malware<br>Arch Linux AUR Hit By Another Wave Of Now More Sophisticated Malware Attack<br>YSERVER: Modern X11 Server Written In Rust With The Help Of Claude Code<br>Russian Spam & Profanities Are Now Plaguing The Arch Linux AUR<br>AMD Opens Pre-Orders For The Linux-Friendly Ryzen AI Halo Developer Platform

Linux Enacts Guidance To Tighten Acceptance Of New File-Systems Into The Kernel

KDE Plasma 6 Desktop Finally Comes To Slackware

Btrfs Now Enables Large Folios By Default, Lands Huge Folios With Linux 7.2

Wayland's Weston 16 Alpha Brings HDR Improvements, Vulkan Renderer Fixes

Linux 7.2 Improves Anonymous/Unnamed Pipe Performance For Shell Pipelines & More

Intel Compute Runtime Now Advertises Early Support For Nova Lake, Introduces Experimental "LEO"

Linux 7.2 Can Significantly Lower Container Exit/Unmount Latency

Linux 7.2 Adds Ability To Limit Programs To Only Open Regular Files, Avoid Being Tricked Or Doing Silly Things

Wine Wayland Lands Fractional Scaling Support

KDE Plasma 6.7 Released With Per-Screen Virtual Desktops, Wayland Improvements

Linux 7.2 Drops Driver For The 40+ Year Old Hercules Monochrome ISA Graphics Card

Linux 7.2 Optimization Shows +5% IOPS For EXT4 & XFS After Moving Around Two Lines Of Code

Intel Performance Skills: New Open-Source Project Leveraging AI For Linux Performance Optimizations

Russian Spam & Profanities Are Now Plaguing The Arch Linux AUR

Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations.

Open-Source Success Achieved For Greater...

linux pipe performance improves code anonymous

Related Articles