mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Christoph Hellwig <hch@lst.de>, Hongbo Li <lihongbo22@huawei.com>
Cc: chao@kernel.org, brauner@kernel.org, djwong@kernel.org,
	amir73il@gmail.com, linux-fsdevel@vger.kernel.org,
	linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v15 0/9] erofs: Introduce page cache sharing feature
Date: Sat, 17 Jan 2026 00:30:08 +0800	[thread overview]
Message-ID: <96353e77-6118-4272-be8f-ae1ece5b57a4@linux.alibaba.com> (raw)
In-Reply-To: <20260116153656.GA21174@lst.de>



On 2026/1/16 23:36, Christoph Hellwig wrote:
> Sorry, just getting to this from my overful inbox by now.
> 
> On Fri, Jan 16, 2026 at 09:55:41AM +0000, Hongbo Li wrote:
>> 2.1. file open & close
>> ----------------------
>> When the file is opened, the ->private_data field of file A or file B is
>> set to point to an internal deduplicated file. When the actual read
>> occurs, the page cache of this deduplicated file will be accessed.
> 
> So the first opener wins and others point to it?  That would lead to
> some really annoying life time rules.  Or you allocate a hidden backing
> file and have everyone point to it (the backing_file related subject
> kinda hints at that), which would be much more sensible, but then the
> above descriptions would not be correct.

Your latter thought is correct, I think the words above
are ambiguous.

> 
>>
>> When the file is opened, if the corresponding erofs inode is newly
>> created, then perform the following actions:
>> 1. add the erofs inode to the backing list of the deduplicated inode;
>> 2. increase the reference count of the deduplicated inode.
> 
> This on the other hand suggests the fist opener is used approach again?

Not quite sure about this part, assuming you read the
patches, it's just similar to the backing_file approach.

> 
>> Assuming the deduplication inode's page cache is PGCache_dedup, there
> 
> What is PGCache_dedup?

Maybe it's just an outdated expression from the older versions
from Hongzhen.  I think just ignore this part.

> 
>> Iomap and the layers below will involve disk I/O operations. As
>> described in 2.1, the deduplicated inode itself is not bound to a
>> specific device. The deduplicated inode will select an erofs inode from
>> the backing list (by default, the first one) to complete the
>> corresponding iomap operation.
> 
> What happens for mmap I/O where folio->mapping is kinda important?

`folio->mapping` will just get the anon inode, but
(meta)data I/Os will submit to one of the real
filesystem (that is why a real inode is needed to
pass into iomap), and use the data to fill the
anon inode page cache, and the anon inode is like
backing_file, and vma->vm_file will point to the
hidden backing file backed by the anon inode .

Thanks,
Gao Xiang

> 
> Also do you have a git tree for the whole feature?


  reply	other threads:[~2026-01-16 16:30 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16  9:55 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
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 [this message]
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=96353e77-6118-4272-be8f-ae1ece5b57a4@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chao@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=lihongbo22@huawei.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®