Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wilczynski <m.wilczynski@samsung.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Russell King <linux@armlinux.org.uk>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Helge Deller <deller@gmx.de>, Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Minchan Kim <minchan@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
	linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-block@vger.kernel.org,
	Yann Collet <yann.collet.73@gmail.com>,
	Nick Terrell <terrelln@meta.com>, Gao Xiang <xiang@kernel.org>,
	Chao Yu <chao@kernel.org>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Phillip Lougher <phillip@squashfs.org.uk>,
	Sungguk <sungguk.na@samsung.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-erofs@lists.ozlabs.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH RFC 1/9] lib/lz4: import upstream LZ4 sources verbatim
Date: Sun, 4 Oct 2026 01:34:46 +0200	[thread overview]
Message-ID: <34143c5f-5b1c-4ae2-90e7-d999d10b73cf@samsung.com> (raw)
In-Reply-To: <arnosKlQYVIdmTR7@google.com>



On 9/28/26 06:12, Sergey Senozhatsky wrote:
> On (26/09/25 13:27), Michal Wilczynski wrote:
> [..]
>> +#ifndef LZ4_FAST_DEC_LOOP
>> +#  if defined __i386__ || defined _M_IX86 || defined __x86_64__ || defined _M_X64
>> +#    define LZ4_FAST_DEC_LOOP 1
>> +#  elif defined(__aarch64__) && defined(__APPLE__)
>> +#    define LZ4_FAST_DEC_LOOP 1
>> +#  elif defined(__aarch64__) && !defined(__clang__)
>> +     /* On non-Apple aarch64, we disable this optimization for clang because
>> +      * on certain mobile chipsets, performance is reduced with clang. For
>> +      * more information refer to https://protect2.fireeye.com/v1/url?k=e59d343e-8402d40e-e59cbf71-000babe403ab-24cad800d51083a3&q=1&e=1265adcb-d286-42f9-9d57-b9b998ba2ed0&u=https%3A%2F%2Fgithub.com%2Flz4%2Flz4%2Fpull%2F707 */
>> +#    define LZ4_FAST_DEC_LOOP 1
>> +#  else
>> +#    define LZ4_FAST_DEC_LOOP 0
>> +#  endif
>> +#endif
> 
> I just checked https://protect2.fireeye.com/v1/url?k=f36de8be-92f2088e-f36c63f1-000babe403ab-1972efa3caab0762&q=1&e=1265adcb-d286-42f9-9d57-b9b998ba2ed0&u=https%3A%2F%2Fgithub.com%2Flz4%2Flz4%2Fpull%2F707 and it seems that
> LZ4_FAST_DEC_LOOP is enabled on aarch64 now, but we still disable it.
> Am I missing something?
> 

You're right for clang builds. v1.10.0 enables the fast loop on aarch64
only with GCC clang has been excluded since PR you mentioned. Upstream
has since changed that neither of those commits is released yet:

0aa33884faf5 ("[LZ4] Limit disabling LZ4_FAST_DEC_LOOP to
aarch64+clang+android")

ed86bc1ed802 ("AArch64: Enable LZ4_FAST_DEC_LOOP for Android")


The first is already enough for the kernel.

For v2 I'll backport both commits into the vendored lz4.c the same
way patch 2 backports 5ef1f16929b5. They apply cleanly in order and
give exactly upstream's current condition, and they go away at the next
resync.

Best regards,
-- 
Michal Wilczynski <m.wilczynski@samsung.com>


  reply	other threads:[~2026-10-03 23:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260925113450eucas1p2fcf838f00f35e1bce0ca04a694cd0cd2@eucas1p2.samsung.com>
2026-09-25 11:27 ` [PATCH RFC 0/9] lib/lz4: stop forking upstream LZ4, vendor it instead Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 2/9] lib/lz4: backport upstream's -Wmissing-prototypes fix Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 3/9] lib/lz4: add the build environment for the vendored sources Michal Wilczynski
2026-09-28  5:48     ` Sergey Senozhatsky
2026-10-04  0:05       ` Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 4/9] arch: boot: put the LZ4 freestanding headers on the decompressor path Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 5/9] lib/lz4: switch the compressor to the vendored sources Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 6/9] lib/lz4: switch the HC " Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 7/9] lib/lz4: switch the decompressor " Michal Wilczynski
2026-09-28  4:16     ` Sergey Senozhatsky
2026-10-03 23:38       ` Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 8/9] lib/lz4: fold lz4_kernel_api.h into <linux/lz4.h> Michal Wilczynski
2026-09-25 11:27   ` [PATCH RFC 9/9] MAINTAINERS: add an entry for the LZ4 compression library Michal Wilczynski
2026-09-25 21:39     ` Eric Biggers
2026-10-03 22:45       ` Michal Wilczynski
2026-09-25 22:07   ` [PATCH RFC 0/9] lib/lz4: stop forking upstream LZ4, vendor it instead Eric Biggers
2026-09-28  4:25   ` Sergey Senozhatsky
2026-09-28  8:27     ` Sergey Senozhatsky
     [not found]   ` <CGME20260925113452eucas1p170bfdb34dfbf670a14a6f8f0c2f5094a@eucas1p1.samsung.com>
     [not found]     ` <20260925-lz4-vendor-upstream-v1-1-1c7ffbe21c4b@samsung.com>
2026-09-28  4:12       ` [PATCH RFC 1/9] lib/lz4: import upstream LZ4 sources verbatim Sergey Senozhatsky
2026-10-03 23:34         ` Michal Wilczynski [this message]
2026-09-28  5:19       ` Sergey Senozhatsky
2026-10-03 23:50         ` Michal Wilczynski
2026-10-04  8:33           ` David Laight
2026-09-30  6:07       ` Sergey Senozhatsky
2026-10-03 23:52         ` Michal Wilczynski

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=34143c5f-5b1c-4ae2-90e7-d999d10b73cf@samsung.com \
    --to=m.wilczynski@samsung.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=chao@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=deller@gmx.de \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=jaegeuk@kernel.org \
    --cc=jh80.chung@samsung.com \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=m.szyprowski@samsung.com \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=phillip@squashfs.org.uk \
    --cc=senozhatsky@chromium.org \
    --cc=sungguk.na@samsung.com \
    --cc=svens@linux.ibm.com \
    --cc=terrelln@meta.com \
    --cc=tglx@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=x86@kernel.org \
    --cc=xiang@kernel.org \
    --cc=yann.collet.73@gmail.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