Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-04 Thread Nick Terrell
> On Aug 3, 2020, at 6:56 PM, Arvind Sankar wrote: > > On Mon, Aug 03, 2020 at 10:55:01PM +, Nick Terrell wrote: >> >> >>> On Aug 3, 2020, at 2:57 PM, Arvind Sankar wrote: >>> >>> On Mon, Aug 03, 2020 at 12:40:22PM -0700, Nick Terrell wrote: From: Nick Terrell This

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-04 Thread Nick Terrell
> On Aug 4, 2020, at 8:16 AM, Arvind Sankar wrote: > > On Tue, Aug 04, 2020 at 10:32:36AM +0200, Pavel Machek wrote: >> Hi! >> > I've measured the kernel decompression speed using QEMU before and after > this patch for the x86_64 and i386 architectures. The speed-up is about > 10x

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-04 Thread Arvind Sankar
On Tue, Aug 04, 2020 at 02:57:50AM +, Nick Terrell wrote: > > > > On Aug 3, 2020, at 6:56 PM, Arvind Sankar wrote: > > > > > -- I see that ZSTD_copy8 is already using __builtin_memcpy, > > but there must be more that can be optimized? There's a couple 1/2-byte > > sized copies in

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-04 Thread Arvind Sankar
On Tue, Aug 04, 2020 at 10:32:36AM +0200, Pavel Machek wrote: > Hi! > > > >> I've measured the kernel decompression speed using QEMU before and after > > >> this patch for the x86_64 and i386 architectures. The speed-up is about > > >> 10x as shown below. > > >> > > >> Code ArchKernel

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-04 Thread Pavel Machek
Hi! > >> I've measured the kernel decompression speed using QEMU before and after > >> this patch for the x86_64 and i386 architectures. The speed-up is about > >> 10x as shown below. > >> > >> Code ArchKernel Size TimeSpeed > >> v5.8 x86_64 11504832 B 148 ms 79

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-03 Thread Nick Terrell
> On Aug 3, 2020, at 6:56 PM, Arvind Sankar wrote: > > On Mon, Aug 03, 2020 at 10:55:01PM +, Nick Terrell wrote: >> >> >>> On Aug 3, 2020, at 2:57 PM, Arvind Sankar wrote: >>> >>> On Mon, Aug 03, 2020 at 12:40:22PM -0700, Nick Terrell wrote: From: Nick Terrell This

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-03 Thread Arvind Sankar
On Mon, Aug 03, 2020 at 10:55:01PM +, Nick Terrell wrote: > > > > On Aug 3, 2020, at 2:57 PM, Arvind Sankar wrote: > > > > On Mon, Aug 03, 2020 at 12:40:22PM -0700, Nick Terrell wrote: > >> From: Nick Terrell > >> > >> This patch replaces all memcpy() calls with LZ4_memcpy() which calls

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-03 Thread Nick Terrell
> On Aug 3, 2020, at 2:57 PM, Arvind Sankar wrote: > > On Mon, Aug 03, 2020 at 12:40:22PM -0700, Nick Terrell wrote: >> From: Nick Terrell >> >> This patch replaces all memcpy() calls with LZ4_memcpy() which calls >> __builtin_memcpy() so the compiler can inline it. >> >> LZ4 relies heavily

Re: [PATCH] lz4: Fix kernel decompression speed

2020-08-03 Thread Arvind Sankar
On Mon, Aug 03, 2020 at 12:40:22PM -0700, Nick Terrell wrote: > From: Nick Terrell > > This patch replaces all memcpy() calls with LZ4_memcpy() which calls > __builtin_memcpy() so the compiler can inline it. > > LZ4 relies heavily on memcpy() with a constant size being inlined. In > x86 and

[PATCH] lz4: Fix kernel decompression speed

2020-08-03 Thread Nick Terrell
From: Nick Terrell This patch replaces all memcpy() calls with LZ4_memcpy() which calls __builtin_memcpy() so the compiler can inline it. LZ4 relies heavily on memcpy() with a constant size being inlined. In x86 and i386 pre-boot environments memcpy() cannot be inlined because memcpy() doesn't