public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Jonathan Liu <net147@gmail.com>, Huang Jianan <jnhuang95@gmail.com>
Cc: u-boot@lists.denx.de, trini@konsulko.com,
	linux-erofs@lists.ozlabs.org, xiang@kernel.org
Subject: Re: [PATCH v4 2/5] lib/lz4: update LZ4 decompressor module
Date: Sat, 25 May 2024 00:52:26 +0800	[thread overview]
Message-ID: <a9f890d4-555b-488f-85f8-8b22fdfd257b@linux.alibaba.com> (raw)
In-Reply-To: <CANwerB2SBe1+0sW1OXHEfSMA1z-vyAvLfAqVOKdsM-ap=KYbCA@mail.gmail.com>

Hi,

On 2024/5/24 22:26, Jonathan Liu wrote:
> Hi Jianan,
> 
> On Sat, 26 Feb 2022 at 18:05, Huang Jianan <jnhuang95@gmail.com> wrote:
>>
>> Update the LZ4 compression module based on LZ4 v1.8.3 in order to
>> use the newest LZ4_decompress_safe_partial() which can now decode
>> exactly the nb of bytes requested.
>>
>> Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
> 
> I noticed after this commit LZ4 decompression is slower.
> ulz4fn function call takes 1.209670 seconds with this commit.
> After reverting this commit, the ulz4fn function call takes 0.587032 seconds.
> 
> I am decompressing a LZ4 compressed kernel (compressed with lz4 v1.9.4
> using -9 option for maximum compression) on RK3399.
> 
> Any ideas why it is slower with this commit and how the performance
> regression can be fixed?

Just the quick glance, I think the issue may be due to memcpy/memmove
since it seems the main difference between these two codebases
(I'm not sure which LZ4 version the old codebase was based on) and
the new version mainly relies on memcpy/memmove instead of its own
versions.

Would you mind to check the assembly how memcpy/memset is generated
on your platform?

Thanks,
Gao Xiang

> 
> Thanks.
> 
> Regards,
> Jonathan

  reply	other threads:[~2024-05-24 16:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-26  7:05 [PATCH v4 0/5] fs/erofs: new filesystem Huang Jianan
2022-02-26  7:05 ` [PATCH v4 1/5] fs/erofs: add erofs filesystem support Huang Jianan
2022-03-16 12:10   ` Tom Rini
2022-02-26  7:05 ` [PATCH v4 2/5] lib/lz4: update LZ4 decompressor module Huang Jianan
2022-03-16 12:10   ` Tom Rini
2024-05-24 14:26   ` Jonathan Liu
2024-05-24 16:52     ` Gao Xiang [this message]
2024-05-26  8:06       ` Jonathan Liu
2024-05-26 12:18         ` Jianan Huang
2024-05-28 13:28           ` Jonathan Liu
2024-05-28 14:03             ` Gao Xiang
2022-02-26  7:05 ` [PATCH v4 3/5] fs/erofs: add lz4 decompression support Huang Jianan
2022-03-16 12:10   ` Tom Rini
2022-02-26  7:05 ` [PATCH v4 4/5] fs/erofs: add filesystem commands Huang Jianan
2022-03-16 12:10   ` Tom Rini
2022-02-26  7:05 ` [PATCH v4 5/5] test/py: Add tests for the erofs Huang Jianan
2022-03-16 12:10   ` Tom Rini
2022-03-03 14:51 ` [PATCH v4 0/5] fs/erofs: new filesystem Huang Jianan
2022-03-03 19:15   ` Tom Rini
2022-03-05 13:06     ` Huang Jianan
2022-03-05 14:57       ` Tom Rini

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=a9f890d4-555b-488f-85f8-8b22fdfd257b@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=jnhuang95@gmail.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=net147@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --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