Hi, On Tue, Feb 24, 2026 at 06:43:08PM -0300, Henrique Brito wrote: > 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.
Well, looking at sendfile(2), i wonder what the difference is between sendfile(2) and copy_file_range(2) that seems more generic; is it that sendfile can also copy non-seekable streams? Can't sendfile(2) be implemented then as a copy_file_range(2) when they are both regular files? > My implementation follows the basics idea of the sendfile: Transfer data > between two file descriptors without copying anything to user space, > boosting Performance. It would be nice if file systems could get a VOP call on this; some FSes can then internally just copy its administration or references without even needing to load from and save to disc. FSes then can by defaukt bail out or decide its not feasable if say its not possible for whatever reason like it crosses mountpoints and the generic data read/write copy-in-the-kernel code could then take over. With regards, Reinoud
