One of the features being worked on for a while with the read-only EROFS file-system is page cache sharing. Besides EROFS being popular on some mobile/embedded devices, this open-source read-only file-system has been quite popular for container usage and there this page cache sharing functionality can provide some significant reductions in RAM usage.
At a time when system memory prices continue to climb, EROFS page cache sharing can offer a significant reduction in memory use for Linux servers. Currently when reading files with different paths or names but the same file contents, it can consume multiple copies of the page cache, even if the contents of the cache are identical. Such as identical libraries from two different minor versions of container images can yield multiple copies of the same page cache.
This EROFS page cache sharing can avoid having those duplicated page caches and in turn yield some pretty sizable memory savings. Hongbo Li of Huawei showed some of the latest benchmarks of this EROFS page cache sharing impact:
Those interested in this work can see the v11 patch series now out for review on the Linux kernel mailing list.
