Linux READFILE System Call Revived Now That It Might Have A User
Written by Michael Larabel in Linux Kernel on 24 November 2020 at 08:08 AM EST. 45 Comments
LINUX KERNEL --
Earlier this year we mentioned Greg Kroah-Hartman working on a new READFILE system call. The goal of this new syscall is for reading small and medium files more efficiently by having one call to read a file straight into a buffer without having to use the separate open/read/close system calls. It's looking like that system call is back on the table and could be mainlined now that there's a possible user.

The READFILE system call is simple for reading lightweight files straight into a buffer without the overhead of multiple system calls that in turn can help performance, especially if reading many files such as on sysfs/debugfs and the like.

It had been a number of months without any updates on that syscall and it wasn't mainlined in the cycles since it was proposed earlier this year. But now it looks like it's back on the table.

Stemming from the ongoing discussions over Intel exposing their hybrid CPU topology via sysfs, performance concerns were raised when frequently hitting sysfs frequently and that's where Greg KH brought up his system call.

Greg commented that he has been waiting on a solid reason to get this new system call merged besides his mini benchmarks he wrote for demonstrating the possible performance benefits. He's also looking at another possible bottleneck in the sysfs read performance stemming from this Intel hybrid topology exposure conversation.

Indeed Greg updated his readfile Git branch that re-bases the system call implementation and tests atop Linux 5.10. That's the first activity we have seen to the readfile code in months with it now being re-based while all the functionality appears to be the same. So hopefully now that there's a potential user of this syscall for quickly and easily reading files we might finally see it merged in a 2021 kernel release.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week