From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Barry Song <21cnbao@gmail.com>
Cc: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org,
huyue2@coolpad.com, jefflexu@linux.alibaba.com,
dhavale@google.com, linux-kernel@vger.kernel.org,
Barry Song <v-songbaohua@oppo.com>
Subject: Re: [PATCH RFC] fs: erofs: support PG_mappedtodisk flag for folios with zero-filled
Date: Thu, 17 Oct 2024 16:16:54 +0800 [thread overview]
Message-ID: <dcbf0903-67a2-4b8e-b43b-d6b9cf195a5a@linux.alibaba.com> (raw)
In-Reply-To: <CAGsJ_4yLK3sCeJNdZRKxD2tSdMVFRBp9eq-1mAMu7UT=gqpA_Q@mail.gmail.com>
On 2024/10/17 16:09, Barry Song wrote:
> On Thu, Oct 17, 2024 at 9:00 PM Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
>>
>>
>>
>> On 2024/10/17 15:58, Gao Xiang wrote:
>>> Hi Barry,
>>>
>>> On 2024/10/17 15:43, Barry Song wrote:
>>>> From: Barry Song <v-songbaohua@oppo.com>
>>>>
>>>> When a folio has never been zero-filled, mark it as mappedtodisk
>>>> to allow other software components to recognize and utilize the
>>>> flag.
>>>>
>>>> Signed-off-by: Barry Song <v-songbaohua@oppo.com>
>>>
>>> Thanks for this!
>>>
>>> It looks good to me as an improvement as long as PG_mappedtodisk
>>> is long-term lived and useful to users.
>>>
>>> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
>>
>
> thanks!
>
>> BTW, I wonder if iomap supports this since uncompressed EROFS
>> relies on iomap paths...
>
> In the core layer, I only see fs/buffer.c's block_read_full_folio()
> and fs/mpage.c's mpage_readahead() and mpage_readahead()
> supporting this. I haven't found any code in iomap that sets the
> flag.
>
> I guess erofs doesn't call the above functions for non-compressed
> files?
mpage are obsoleted interfaces (of course EROFS could use
them instead, see my backport to centos 7 [1]), and iomap
is used for recent unencoded I/O use cases.
It would be better to add support for iomap too, but I guess
PG_mappedtodisk has very few users in the upstream kernel,
so they might ask for further use cases tho ;-)
Thanks,
Gao Xiang
[1] https://github.com/erofs/kmod-erofs/blob/main/src/data.c#L249
>
>>
>> Thanks,
>> Gao Xiang
>
> Barry
prev parent reply other threads:[~2024-10-17 8:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 7:43 [PATCH RFC] fs: erofs: support PG_mappedtodisk flag for folios with zero-filled Barry Song
2024-10-17 7:58 ` Gao Xiang
2024-10-17 8:00 ` Gao Xiang
2024-10-17 8:09 ` Barry Song
2024-10-17 8:16 ` Gao Xiang [this message]
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=dcbf0903-67a2-4b8e-b43b-d6b9cf195a5a@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=21cnbao@gmail.com \
--cc=chao@kernel.org \
--cc=dhavale@google.com \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v-songbaohua@oppo.com \
--cc=xiang@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