From: Christoph Hellwig <hch@lst.de>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: Christoph Hellwig <hch@lst.de>, Hongbo Li <lihongbo22@huawei.com>,
chao@kernel.org, djwong@kernel.org, amir73il@gmail.com,
linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Christian Brauner <brauner@kernel.org>,
oliver.yang@linux.alibaba.com
Subject: Re: [PATCH v15 5/9] erofs: introduce the page cache share feature
Date: Tue, 20 Jan 2026 07:52:42 +0100 [thread overview]
Message-ID: <20260120065242.GA3436@lst.de> (raw)
In-Reply-To: <50db56b8-4cf9-4d62-b242-c982a260a330@linux.alibaba.com>
On Tue, Jan 20, 2026 at 11:07:48AM +0800, Gao Xiang wrote:
>
> Hi Christoph,
>
> Sorry I didn't phrase things clearly earlier, but I'd still
> like to explain the whole idea, as this feature is clearly
> useful for containerization. I hope we can reach agreement
> on the page cache sharing feature: Christian agreed on this
> feature (and I hope still):
>
> https://lore.kernel.org/linux-fsdevel/20260112-begreifbar-hasten-da396ac2759b@brauner
He has to ultimatively decide. I do have an uneasy feeling about this.
It's not super informed as I can keep up, and I'm not the one in charge,
but I hope it is helpful to share my perspective.
> First, let's separate this feature from mounting in user
> namespaces (i.e., unprivileged mounts), because this feature
> is designed specifically for privileged mounts.
Ok.
> The EROFS page cache sharing feature stems from a current
> limitation in the page cache: a file-based folio cannot be
> shared across different inode mappings (or the different
> page index within the same mapping; If this limitation
> were resolved, we could implement a finer-grained page
> cache sharing mechanism at the folio level). As you may
> know, this patchset dates back to 2023,
I didn't..
> and as of 2026; I
> still see no indication that the page cache infra will
> change.
It will be very hard to change unless we move to physical indexing of
the page cache, which has all kinds of downside.s
> So that let's face the reality: this feature introduces
> on-disk xattrs called "fingerprints." --- Since they're
> just xattrs, the EROFS on-disk format remains unchanged.
I think the concept of using a backing file of some sort for the shared
pagecache (which I have no problem with at all), vs the imprecise
selection through a free form fingerprint are quite different aspects,
that could be easily separated. I.e. one could easily imagine using
the data path approach based purely on exact file system metadata.
But that would of course not work with multiple images, which I think
is a key feature here if I'm reading between the lines correctly.
> - Let's not focusing entirely on the random human bugs,
> because I think every practical subsystem should have bugs,
> the whole threat model focuses on the system design, and
> less code doesn't mean anything (buggy or even has system
> design flaw)
Yes, threats through malicious actors are much more intereating
here.
> - EROFS only accesses the (meta)data from the source blobs
> specified at mount time, even with multi-device support:
>
> mount -t erofs -odevice=[blob],device=[blob],... [source]
That is an important part that wasn't fully clear to me.
next prev parent reply other threads:[~2026-01-20 6:52 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 9:55 [PATCH v15 0/9] erofs: Introduce page cache sharing feature Hongbo Li
2026-01-16 9:55 ` [PATCH v15 1/9] fs: Export alloc_empty_backing_file Hongbo Li
2026-01-16 9:55 ` [PATCH v15 2/9] erofs: decouple `struct erofs_anon_fs_type` Hongbo Li
2026-01-16 15:38 ` Christoph Hellwig
2026-01-19 1:34 ` Hongbo Li
2026-01-19 1:44 ` Gao Xiang
2026-01-19 2:23 ` Hongbo Li
2026-01-19 7:28 ` Christoph Hellwig
2026-01-16 9:55 ` [PATCH v15 3/9] erofs: support user-defined fingerprint name Hongbo Li
2026-01-16 9:55 ` [PATCH v15 4/9] erofs: support domain-specific page cache share Hongbo Li
2026-01-16 9:55 ` [PATCH v15 5/9] erofs: introduce the page cache share feature Hongbo Li
2026-01-16 15:46 ` Christoph Hellwig
2026-01-16 16:21 ` Gao Xiang
2026-01-19 7:29 ` Christoph Hellwig
2026-01-19 7:53 ` Gao Xiang
2026-01-19 8:12 ` Gao Xiang
2026-01-19 8:32 ` Christoph Hellwig
2026-01-19 8:52 ` Gao Xiang
2026-01-19 9:22 ` Christoph Hellwig
2026-01-19 9:38 ` Gao Xiang
2026-01-19 9:53 ` Gao Xiang
2026-01-20 3:07 ` Gao Xiang
2026-01-20 6:52 ` Christoph Hellwig [this message]
2026-01-20 7:19 ` Gao Xiang
2026-01-22 8:33 ` Christoph Hellwig
2026-01-22 8:40 ` Gao Xiang
2026-01-23 5:39 ` Christoph Hellwig
2026-01-23 5:58 ` Gao Xiang
2026-01-20 13:40 ` Christian Brauner
2026-01-20 14:11 ` Gao Xiang
2026-01-20 12:29 ` Hongbo Li
2026-01-22 14:48 ` Hongbo Li
2026-01-23 6:19 ` Christoph Hellwig
2026-01-20 14:19 ` Gao Xiang
2026-01-20 14:33 ` Gao Xiang
2026-01-21 1:29 ` Hongbo Li
2026-01-16 9:55 ` [PATCH v15 6/9] erofs: pass inode to trace_erofs_read_folio Hongbo Li
2026-01-16 9:55 ` [PATCH v15 7/9] erofs: support unencoded inodes for page cache share Hongbo Li
2026-01-16 9:55 ` [PATCH v15 8/9] erofs: support compressed " Hongbo Li
2026-01-16 9:55 ` [PATCH v15 9/9] erofs: implement .fadvise " Hongbo Li
2026-01-16 15:46 ` Christoph Hellwig
2026-01-19 1:30 ` Hongbo Li
2026-01-16 15:36 ` [PATCH v15 0/9] erofs: Introduce page cache sharing feature Christoph Hellwig
2026-01-16 16:30 ` Gao Xiang
2026-01-16 16:43 ` Gao Xiang
2026-01-19 1:23 ` Hongbo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260120065242.GA3436@lst.de \
--to=hch@lst.de \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=chao@kernel.org \
--cc=djwong@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=lihongbo22@huawei.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.yang@linux.alibaba.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox