{"id":274654,"date":"2026-06-16T13:05:00","date_gmt":"2026-06-16T17:05:00","guid":{"rendered":"https:\/\/news-you-need.com\/index.php\/2026\/06\/16\/linux-7-2-improves-anonymous-unnamed-pipe-performance-for-shell-pipelines-more\/"},"modified":"2026-06-16T13:40:17","modified_gmt":"2026-06-16T17:40:17","slug":"linux-7-2-improves-anonymous-unnamed-pipe-performance-for-shell-pipelines-more","status":"publish","type":"post","link":"https:\/\/news-you-need.com\/index.php\/2026\/06\/16\/linux-7-2-improves-anonymous-unnamed-pipe-performance-for-shell-pipelines-more\/","title":{"rendered":"Linux 7.2 Improves Anonymous\/Unnamed Pipe Performance For Shell Pipelines &#038; More"},"content":{"rendered":"<p><a href=\"https:\/\/www.phoronix.com\/news\/Linux-72-Faster-Anon-Pipe-Write\">Linux 7.2 Improves Anonymous\/Unnamed Pipe Performance For Shell Pipelines &#038; More<\/a><\/p>\n<p><a href=\"https:\/\/www.phoronix.com\/news\/Linux-72-Faster-Anon-Pipe-Write\">https:\/\/www.phoronix.com\/news\/Linux-72-Faster-Anon-Pipe-Write<\/a><\/p>\n<p>Publish Date: <a href=\"publish_date]\">2026-06-16 13:05:00<\/a><\/p>\n<p>Source Domain: <a href=\"www.phoronix.com\">www.phoronix.com<\/a><\/p>\n<p>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.<\/p>\n<p>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.\n<\/p>\n<p>In the VFS misc pull request that situation is described as:<br \/>\n<\/p>\n<p>&#8220;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 &#8211; when the cost of holding the mutex across reclaim is highest &#8211; throughput improves 21-48% and latency drops 17-33%. The microbenchmark is added to selftests.&#8221;<br \/>\n<br \/>Very nice gains. More of the numbers in detail can be found via this patch cover letter by Breno Leitao.<\/p>\n<p align=\"center\"><img decoding=\"async\" src=\"https:\/\/www.phoronix.net\/image.php?id=2026&#038;image=linux_72_pipes\" alt=\"Linux 7.2 unnamed pipes performance\"\/><\/p>\n<p>That work is now merged for Linux 7.2.<br \/>\n<br \/><a href=\"https:\/\/www.phoronix.com\/news\/Linux-72-Faster-Anon-Pipe-Write\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux 7.2 Improves Anonymous\/Unnamed Pipe Performance For Shell Pipelines &#038; More https:\/\/www.phoronix.com\/news\/Linux-72-Faster-Anon-Pipe-Write Publish Date: 2026-06-16&#8230;<\/p>\n","protected":false},"author":1,"featured_media":274655,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.phoronix.net\/image.php?id=2026&image=linux_72_pipes","fifu_image_alt":"","footnotes":""},"categories":[48],"tags":[71],"class_list":["post-274654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/274654"}],"collection":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/comments?post=274654"}],"version-history":[{"count":1,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/274654\/revisions"}],"predecessor-version":[{"id":274656,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/274654\/revisions\/274656"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media\/274655"}],"wp:attachment":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media?parent=274654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/categories?post=274654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/tags?post=274654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}