Forgot to link the pull request 😅: https://github.com/NetBSD/src/pull/73
On Tue, Feb 24, 2026 at 6:43 PM Henrique Brito <[email protected]> wrote: > > Hello Tech Kern ! > > My name is Henrique Brito and, as I've stated in my previous emails, I am > interested in contributing to compat linux emulation layer through GSoC 2026. > (https://wiki.netbsd.org/projects/project/linux_timer/) > As a starting point, I've decided to begin my journey with some practical > experience, so I tried my best to write an emulation for the Linux sendfile > (2) syscall. > I would really appreciate any feedback that you may have, the application > period is approaching, and your opinion would be of immense value to me. > > My implementation follows the basics idea of the sendfile: Transfer data > between two file descriptors without copying anything to user space, boosting > Performance. > > Currently, the emulation is able to pass all LTP tests for the sendfile > syscall, providing Linux Binaries the expected ABI. > > As far as I have tested, the sendfile emulation is as fast as the read + > write syscalls, unlike the Linux version, which is significantly faster than > the two. I have spoken with people in Libera Chat about this, and they > pointed that this may be due the optimization of NetBSD's read/write, instead > of a problem with the sendfile. > Although there aren't any real performance gains, I think that it still has > its uses, as it broadens the compat linux coverage of syscalls and, at the > same time, don't impact negatively Binaries that can use the read + write > when sendfile is not present. > > Please, let me know your thoughts about it. > > Best regards, Henrique > > -- > Henrique de Brito > Computer Science Student > Federal University of São Carlos - UFSCar > -- Henrique de Brito Computer Science Student Federal University of São Carlos - UFSCar
