3 ms·
> In practice, the main problem is that you can't use private mappings (which are the default and for good reason); you have to use shared mapping, which are ve
by eru 2y ago
> In practice, the main problem is that you can't use private mappings (which are the default and for good reason); you have to use shared mapping, which are very finicky to set up and cause infelicities with `fork`. [This does make me wonder how reflinks/`copy_file_range` interact with `mmap` and the page cache.]
Yet another reason fork was never a good design choice.
- fc417fc802 2y agoIs fork really the problem in this scenario?
- eru 2y agoI don't think it's the main problem here, but it's just another point where the fork/exec model shows its problems.
- fc417fc802 2y agoWhat would you replace fork with? I don't get it. Isn't the desired improvement here to how the kernel handles the lifetime of mappings? It seems orthogonal to me.