From: Yue Hu <zbestahu@gmail.com>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: linux-erofs@lists.ozlabs.org, Yue Hu <huyue2@yulong.com>,
geshifei@yulong.com, zhangwen@yulong.com, shaojunjun@yulong.com
Subject: Re: [RFC PATCH 1/2] erofs-utils: support tail-packing inline compressed data
Date: Wed, 27 Oct 2021 16:02:15 +0800 [thread overview]
Message-ID: <20211027160215.00000527.zbestahu@gmail.com> (raw)
In-Reply-To: <YXkBIpcCG12Y8qMN@B-P7TQMD6M-0146.local>
Hi Xiang,
On Wed, 27 Oct 2021 15:34:58 +0800
Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
> Hi Yue,
>
> On Wed, Oct 27, 2021 at 03:21:37PM +0800, Yue Hu wrote:
>
> ...
>
> > > > > - if (len <= pclustersize) {
> > > > > + if (!tail_pcluster && len <= pclustersize) {
> > > > > if (final) {
> > > > > - if (len <= EROFS_BLKSIZ)
> > > > > + if (erofs_sb_has_tailpacking()) {
> > > > > + tail_pcluster = true;
> > > > > + pclustersize = EROFS_BLKSIZ;
> > > >
> > > > Not quite sure if such condition can be trigged for many times...
> > > >
> > > > Think about it. If the original pclustersize == 16 * EROFS_BLKSIZ, so we
> > > > could have at least 16 new pclustersize == EROFS_BLKSIZ then?
> > > >
> > > > But only the last pclustersize == EROFS_BLKSIZ can be inlined...
> > >
> > > Let me think about it more.
> >
> > I understand we need to compress the tail pcluster(len <= pclustersize) by destsize
> > of fixed 4KB to get better inline result. rt?
>
> I think this is the tricky part of tail-packing inline support for
> compressed data.
>
> As you may know, EROFS supports variable-sized blocks for each pcluster
> so you could change pclustersize accordingly for the last pclusters.
>
> For example, originally if the size of the last one pcluster is
> 16 * EROFS_BLKSIZ (therefore it cannot be tail-packing directly), there
> are 2 policies in practice can be achieved:
> 1) compress with 2 pclusters ---
> X pcluster size + Y (Y <= 4KiB) pcluster size (so the last one can
> be tail-packing);
Sounds good. Let me check.
> 2) compress with 4KiB pclusters ---
> 4KiB pcluster + 4KiB pcluster + ... + Z (Z <= 4KiB) pcluster
>
> I'm not sure which one is easier to implement, maybe 2) is easier, so we
> could implement it first.
Yeah, the patch already includes it.
Thanks.
>
> Thanks,
> Gao Xiang
>
next prev parent reply other threads:[~2021-10-27 8:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 12:30 [RFC PATCH 0/2] erofs-utils: compression inline feature Yue Hu
2021-10-25 12:30 ` [RFC PATCH 1/2] erofs-utils: support tail-packing inline compressed data Yue Hu
2021-10-26 12:00 ` Gao Xiang
2021-10-27 1:58 ` Yue Hu
2021-10-27 7:21 ` Yue Hu
2021-10-27 7:34 ` Gao Xiang
2021-10-27 8:02 ` Yue Hu [this message]
2021-10-25 12:30 ` [RFC PATCH 2/2] erofs-utils: fuse: " Yue Hu
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=20211027160215.00000527.zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=geshifei@yulong.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=huyue2@yulong.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=shaojunjun@yulong.com \
--cc=zhangwen@yulong.com \
/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