Rewriting the GNU Coreutils in Rust
Rewriting the GNU Coreutils in Rust
Posted Jun 9, 2021 13:51 UTC (Wed) by Paf (subscriber, #91811)In reply to: Rewriting the GNU Coreutils in Rust by NYKevin
Parent article: Rewriting the GNU Coreutils in Rust
Yeah, I don’t fully follow some of the details of your thought, but I think you’ve found a few of the issues. My impression - I’m a file system developer but I don’t actually know this, it’s just an impression - is that send file is implemented this way to avoid allocating large buffers inside the kernel.
You can do things like mmap in the kernel; in general you can kind of do ... whatever. But a lot of it is ugly or weird (using syscall type functionality within the kernel is prone to weird reentrancy issues), or requires allocating big blobs of memory in the kernel.
Things like COW for page cache memory would be ... weird. It gets in to areas I’m not familiar with, but I would think faulting, etc, might be a problem.
(Also, I misremembered above - send file is *always* via a pipe.)
