Linux 5.17 To Boast Latency Optimization For AF_UNIX Sockets

Written by Michael Larabel in Linux Kernel on 28 November 2021 at 07:14 AM EST. 11 Comments
Net-next has been queuing a number of enticing performance optimizations ahead of the Linux 5.17 merge window kicking off around the start of the new year. Covered already was a big TCP optimization and a big improvement for csum_partial() that is used in the network code for checksum computation. The latest optimization is improving the AF_UNIX code path for those using AF_UNIX sockets for local inter-process communication.

A new patch series was queued up on Friday in net-next for improving the AF_UNIX code. That patch series by Kuniyuki Iwashima of Amazon Japan is ultimately about replacing AF_UNIX sockets' single big lock with per-hash locks. The series replaces the AF_UNIX big lock and also as part of the series has a speed-up to the autobind behavior.

The patch series is enticing for heavy AF_UNIX usage. Replacing the big lock has a nice latency improvement in testing conducted by Amazon AWS:

Relaxing a race within unix_autobind() provides for another nice latency improvement in cases of autobind'ing many sockets in parallel by searching for a name from a random number.

Linux 5.17 material continues piling up to make for an exciting next kernel cycle in 2022.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week