On 2025/7/3 20:23, Christian Brauner wrote:
Hey! This series is originally from Hongzhen. I'm picking it back up because support for page cache sharing is pretty important for container and service workloads that want to make use of erofs images. The main obstacle currently is the inability to share page cache contents between different erofs superblocks.
Hi Christian, Many thanks for your effort. I do hope this feature can be landed upstream too since as you said it's important to container workloads. Hongzhen had a job change recently, so he may not follow this. It's on my own TODO list too, but it would be awesome if you could take this! Anyway, we could consider resending this to -fsdevel for more discussion (I think you forgot about it ;-)). But personally I think using anon inode mapping (vma->vm_file = anon_file) for mmap is fine to userspace, it just needs more work to handle edge cases like data source redirection if one sb is gone. Thanks, Gao Xiang
I think the mechanism that Hongzhen came up with is decent and will remove one final obstacle. However, I have not worked in this area in meaningful ways before so to an experienced page cache person this might all look like a little kid doodling on a piece of paper. One obvious question mark I have is around mmap. The current implementation mimicks what overlayfs is doing and I'm not sure that it's correct or even necessary to mimick overlayfs behavior here at all. Anyway, I would really appreciate the help!