mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
erofs: introduce the page cache share feature
Currently, reading files with different paths (or names) but the same content will consume multiple copies of the page cache, even if the content of these page caches is the same. For example, reading identical files (e.g., *.so files) from two different minor versions of container images will cost multiple copies of the same page cache, since different containers have different mount points. Therefore, sharing the page cache for files with the same content can save memory. This introduces the page cache share feature in erofs. It allocate a shared inode and use its page cache as shared. Reads for files with identical content will ultimately be routed to the page cache of the shared inode. In this way, a single page cache satisfies multiple read requests for different files with the same contents. We introduce new mount option `inode_share` to enable the page sharing mode during mounting. This option is used in conjunction with `domain_id` to share the page cache within the same trusted domain. Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com> Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
This commit is contained in:
@@ -131,7 +131,12 @@ fsid=%s Specify a filesystem image ID for Fscache back-end.
|
||||
domain_id=%s Specify a trusted domain ID for fscache mode so that
|
||||
different images with the same blobs, identified by blob IDs,
|
||||
can share storage within the same trusted domain.
|
||||
Also used for different filesystems with inode page sharing
|
||||
enabled to share page cache within the trusted domain.
|
||||
fsoffset=%llu Specify block-aligned filesystem offset for the primary device.
|
||||
inode_share Enable inode page sharing for this filesystem. Inodes with
|
||||
identical content within the same domain ID can share the
|
||||
page cache.
|
||||
=================== =========================================================
|
||||
|
||||
Sysfs Entries
|
||||
|
||||
Reference in New Issue
Block a user