Instead of needing to perform numerous system calls for traditional file input processing, the “readfile” system call would open the supplied file, read it into a buffer, then shut the file. The use of readfile may be advantageous for reading numerous small files on a regular basis, such as when processing data that the kernel makes available via sysfs.
The readfile system, which was proposed back in 2020, aims to simplify reading of small files using sysfs, procfs, and similar file-systems. It was designed to efficiently read small files. There is now some hope that the new system call might ultimately be submitted for the upcoming kernel cycle because the readfile fixes were re-based yesterday against the current Linux 6.0 state.
Greg pushed the readfile syscall fixes to driver-readfile core’s branch yesterday after re-basing them upon the most recent Linux 6.0-rc2 state. We’ll see whether this is the lucky time and it gets submitted for the v6.1 merging window for this Linux improvement that makes reading small files more efficient by reducing system call overhead.
Greg Kroah-Hartman improved the readfile patches after identifying a probable user and modified them once more in 2021, but they were never submitted to the core.