* [PATCH v5 0/3] lib/lzo: performance improvements
@ 2019-02-05 14:20 Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 1/3] lib/lzo: tidy-up ifdefs Dave Rodgman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dave Rodgman @ 2019-02-05 14:20 UTC (permalink / raw)
To: linux-kernel, Matt Sealey, Dave Rodgman, davem, gregkh, herbert,
markus, minchan, nitingupta910, rpurdie, sergey.senozhatsky.work,
sonnyrao, akpm, sfr
Cc: nd
Hi,
Following on from the previous lzo-rle patchset:
https://lkml.org/lkml/2018/11/30/972
This patchset contains only the patches which were ack'd by Markus (i.e., not
the RLE patches). I believe Markus was happy to land these (please shout if
that's not the case).
Regarding the RLE patches, I've done some additional benchmarking and will
follow up with these as a separate patchset.
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v5 1/3] lib/lzo: tidy-up ifdefs
2019-02-05 14:20 [PATCH v5 0/3] lib/lzo: performance improvements Dave Rodgman
@ 2019-02-05 14:20 ` Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 2/3] lib/lzo: 64-bit CTZ on arm64 Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 3/3] lib/lzo: fast 8-byte copy " Dave Rodgman
2 siblings, 0 replies; 4+ messages in thread
From: Dave Rodgman @ 2019-02-05 14:20 UTC (permalink / raw)
To: linux-kernel, Matt Sealey, Dave Rodgman, davem, gregkh, herbert,
markus, minchan, nitingupta910, rpurdie, sergey.senozhatsky.work,
sonnyrao, akpm, sfr
Cc: nd
Modify the ifdefs in lzodefs.h to be more consistent with normal kernel
macros (e.g., change __aarch64__ to CONFIG_ARM64).
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nitin Gupta <nitingupta910@gmail.com>
Cc: Richard Purdie <rpurdie@openedhand.com>
Cc: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sonny Rao <sonnyrao@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matt Sealey <matt.sealey@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
lib/lzo/lzodefs.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h
index 4edefd2f540c..497f9c9f03a8 100644
--- a/lib/lzo/lzodefs.h
+++ b/lib/lzo/lzodefs.h
@@ -15,7 +15,7 @@
#define COPY4(dst, src) \
put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst))
-#if defined(__x86_64__)
+#if defined(CONFIG_X86_64)
#define COPY8(dst, src) \
put_unaligned(get_unaligned((const u64 *)(src)), (u64 *)(dst))
#else
@@ -25,12 +25,12 @@
#if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
#error "conflicting endian definitions"
-#elif defined(__x86_64__)
+#elif defined(CONFIG_X86_64)
#define LZO_USE_CTZ64 1
#define LZO_USE_CTZ32 1
-#elif defined(__i386__) || defined(__powerpc__)
+#elif defined(CONFIG_X86) || defined(CONFIG_PPC)
#define LZO_USE_CTZ32 1
-#elif defined(__arm__) && (__LINUX_ARM_ARCH__ >= 5)
+#elif defined(CONFIG_ARM) && (__LINUX_ARM_ARCH__ >= 5)
#define LZO_USE_CTZ32 1
#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v5 2/3] lib/lzo: 64-bit CTZ on arm64
2019-02-05 14:20 [PATCH v5 0/3] lib/lzo: performance improvements Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 1/3] lib/lzo: tidy-up ifdefs Dave Rodgman
@ 2019-02-05 14:20 ` Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 3/3] lib/lzo: fast 8-byte copy " Dave Rodgman
2 siblings, 0 replies; 4+ messages in thread
From: Dave Rodgman @ 2019-02-05 14:20 UTC (permalink / raw)
To: linux-kernel, Matt Sealey, Dave Rodgman, davem, gregkh, herbert,
markus, minchan, nitingupta910, rpurdie, sergey.senozhatsky.work,
sonnyrao, akpm, sfr
Cc: nd
From: Matt Sealey <matt.sealey@arm.com>
LZO leaves some performance on the table by not realising that arm64 can
optimize count-trailing-zeros bit operations.
Add CONFIG_ARM64 to the checked definitions alongside CONFIG_X86_64 to
enable the use of rbit/clz instructions on full 64-bit quantities.
Link: http://lkml.kernel.org/r/20181127161913.23863-5-dave.rodgman@arm.com
Signed-off-by: Matt Sealey <matt.sealey@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <nitingupta910@gmail.com>
Cc: Richard Purdie <rpurdie@openedhand.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sonny Rao <sonnyrao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
lib/lzo/lzodefs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h
index 497f9c9f03a8..00d1080155e4 100644
--- a/lib/lzo/lzodefs.h
+++ b/lib/lzo/lzodefs.h
@@ -25,7 +25,7 @@
#if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
#error "conflicting endian definitions"
-#elif defined(CONFIG_X86_64)
+#elif defined(CONFIG_X86_64) || defined(CONFIG_ARM64)
#define LZO_USE_CTZ64 1
#define LZO_USE_CTZ32 1
#elif defined(CONFIG_X86) || defined(CONFIG_PPC)
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v5 3/3] lib/lzo: fast 8-byte copy on arm64
2019-02-05 14:20 [PATCH v5 0/3] lib/lzo: performance improvements Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 1/3] lib/lzo: tidy-up ifdefs Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 2/3] lib/lzo: 64-bit CTZ on arm64 Dave Rodgman
@ 2019-02-05 14:20 ` Dave Rodgman
2 siblings, 0 replies; 4+ messages in thread
From: Dave Rodgman @ 2019-02-05 14:20 UTC (permalink / raw)
To: linux-kernel, Matt Sealey, Dave Rodgman, davem, gregkh, herbert,
markus, minchan, nitingupta910, rpurdie, sergey.senozhatsky.work,
sonnyrao, akpm, sfr
Cc: nd
From: Matt Sealey <matt.sealey@arm.com>
Enable faster 8-byte copies on arm64.
Link: http://lkml.kernel.org/r/20181127161913.23863-6-dave.rodgman@arm.com
Signed-off-by: Matt Sealey <matt.sealey@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <nitingupta910@gmail.com>
Cc: Richard Purdie <rpurdie@openedhand.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sonny Rao <sonnyrao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
lib/lzo/lzodefs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h
index 00d1080155e4..fa0a45fed8c4 100644
--- a/lib/lzo/lzodefs.h
+++ b/lib/lzo/lzodefs.h
@@ -15,7 +15,7 @@
#define COPY4(dst, src) \
put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst))
-#if defined(CONFIG_X86_64)
+#if defined(CONFIG_X86_64) || defined(CONFIG_ARM64)
#define COPY8(dst, src) \
put_unaligned(get_unaligned((const u64 *)(src)), (u64 *)(dst))
#else
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-05 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 14:20 [PATCH v5 0/3] lib/lzo: performance improvements Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 1/3] lib/lzo: tidy-up ifdefs Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 2/3] lib/lzo: 64-bit CTZ on arm64 Dave Rodgman
2019-02-05 14:20 ` [PATCH v5 3/3] lib/lzo: fast 8-byte copy " Dave Rodgman
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).