From: Yue Hu <zbestahu@163.com>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: linux-kernel@vger.kernel.org, huyue2@yulong.com,
linux-erofs@lists.ozlabs.org, zhangwen@yulong.com
Subject: Re: [PATCH] erofs: fix the per-CPU buffer decompression for small output size
Date: Thu, 14 Oct 2021 09:42:59 +0800 [thread overview]
Message-ID: <20211014094259.00004ac5.zbestahu@163.com> (raw)
In-Reply-To: <YWcDNrHBYTQIq6x+@B-P7TQMD6M-0146.local>
On Thu, 14 Oct 2021 00:03:02 +0800
Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
> On Wed, Oct 13, 2021 at 09:10:05PM +0800, Yue Hu wrote:
> > Hi Xiang,
> >
> > On Wed, 13 Oct 2021 19:51:55 +0800
> > Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
> >
> > > Hi Yue,
> > >
> > > On Wed, Oct 13, 2021 at 05:29:05PM +0800, Yue Hu wrote:
> > > > From: Yue Hu <huyue2@yulong.com>
> > > >
> > > > Note that z_erofs_lz4_decompress() will return a positive value if
> > > > decompression succeeds. However, we do not copy_from_pcpubuf() due
> > > > to !ret. Let's fix it.
> > > >
> > > > Signed-off-by: Yue Hu <huyue2@yulong.com>
> > >
> > > Thanks for catching this. This is a valid issue, but it has no real
> > > impact to the current kernels since such pcluster in practice will be
> > > !inplace_io and trigger "if (nrpages_out == 1 && !rq->inplace_io) {"
> > > above for upstream strategies.
> > >
> > > Our customized lz4 implementation will return 0 if success instead, so
> > > it has no issue to our previous products as well.
> >
> > Yes, i just find the issue when i try to implement a new feature of
> > tail-packing inline compressed data. No problem in my current version.
>
> Yeah, please help update the return value of z_erofs_lz4_decompress()
> and get rid of such unneeded fast path.
OK, will update in next version.
Thanks.
>
> Thanks,
> Gao Xiang
>
> >
> > Thanks.
> >
> > >
> > > For such cases, how about updating z_erofs_lz4_decompress() to return
> > > 0 if success instead rather than outputsize. Since I'll return 0 if
> > > success for LZMA as well.
> > >
> > > Thanks,
> > > Gao Xiang
> >
prev parent reply other threads:[~2021-10-14 1:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 9:29 [PATCH] erofs: fix the per-CPU buffer decompression for small output size Yue Hu
2021-10-13 11:51 ` Gao Xiang
2021-10-13 11:58 ` Gao Xiang
2021-10-13 13:10 ` Yue Hu
2021-10-13 16:03 ` Gao Xiang
2021-10-14 1:42 ` Yue Hu [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=20211014094259.00004ac5.zbestahu@163.com \
--to=zbestahu@163.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=huyue2@yulong.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).