DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH] platforms: kernel: optimise squashfs decompression
@ 2024-08-14 10:07 Roland Hieber
  2024-08-14 10:13 ` Robert Schwebel
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Hieber @ 2024-08-14 10:07 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

* Decompress directly into the page cache instead of an intermediate
  buffer, which eliminates a memcpy and it also removes the lock
  contention on the single buffer.

* Enable threaded decompression where possible.
  SQUASHFS_COMPILE_DECOMP_MULTI uses up to two decompressors per core
  and the help text suggests that this is the better option for parallel
  I/O workloads and enough system memory. This is usually not the case
  on our boards, so switch to SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU
  instead, which uses up to one decompressor thread per core and ensures
  decompression is load-balanced across the cores.

[Changes recommended by PTX QA tooling]

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-mips/kernelconfig              | 10 +++++-----
 configs/platform-mips/kernelconfig-ar9331       | 10 +++++-----
 configs/platform-mips/kernelconfig-ar9331.diff  |  2 +-
 configs/platform-mips/kernelconfig-malta.diff   |  4 ++--
 configs/platform-mipsel/kernelconfig            | 10 +++++-----
 configs/platform-mipsel/kernelconfig-malta.diff |  4 ++--
 configs/platform-rpi1/kernelconfig              | 10 +++++-----
 configs/platform-v7a/kernelconfig               |  7 +++----
 configs/platform-v7a_noneon/kernelconfig        | 10 +++++-----
 configs/platform-x86_64/kernelconfig            | 10 +++++-----
 10 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/configs/platform-mips/kernelconfig b/configs/platform-mips/kernelconfig
index 98f3196ef1ef..24f9a8f8235c 100644
--- a/configs/platform-mips/kernelconfig
+++ b/configs/platform-mips/kernelconfig
@@ -2631,13 +2631,13 @@ CONFIG_UBIFS_FS_SECURITY=y
 # CONFIG_UBIFS_FS_AUTHENTICATION is not set
 # CONFIG_CRAMFS is not set
 CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_FILE_CACHE is not set
+CONFIG_SQUASHFS_FILE_DIRECT=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_LZ4 is not set
diff --git a/configs/platform-mips/kernelconfig-ar9331 b/configs/platform-mips/kernelconfig-ar9331
index e83cd18131fc..6e951a614ad8 100644
--- a/configs/platform-mips/kernelconfig-ar9331
+++ b/configs/platform-mips/kernelconfig-ar9331
@@ -2620,13 +2620,13 @@ CONFIG_UBIFS_FS_SECURITY=y
 # CONFIG_UBIFS_FS_AUTHENTICATION is not set
 # CONFIG_CRAMFS is not set
 CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_FILE_CACHE is not set
+CONFIG_SQUASHFS_FILE_DIRECT=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_LZ4 is not set
diff --git a/configs/platform-mips/kernelconfig-ar9331.diff b/configs/platform-mips/kernelconfig-ar9331.diff
index 727497c2a06c..12a0224e9844 100644
--- a/configs/platform-mips/kernelconfig-ar9331.diff
+++ b/configs/platform-mips/kernelconfig-ar9331.diff
@@ -1,4 +1,4 @@
-af97ac2360293c1315a7accdcaa0b01e
+ea4829d5ac8a0aa3ee33fc132702ae88
 # CONFIG_ACORN_PARTITION is undefined
 # CONFIG_AIX_PARTITION is undefined
 # CONFIG_AMIGA_PARTITION is undefined
diff --git a/configs/platform-mips/kernelconfig-malta.diff b/configs/platform-mips/kernelconfig-malta.diff
index ce4b18d27390..679bf6255ed6 100644
--- a/configs/platform-mips/kernelconfig-malta.diff
+++ b/configs/platform-mips/kernelconfig-malta.diff
@@ -1,4 +1,4 @@
-af97ac2360293c1315a7accdcaa0b01e
+ea4829d5ac8a0aa3ee33fc132702ae88
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
 # CONFIG_ACENIC is not set
@@ -1627,7 +1627,7 @@ CONFIG_SOCK_RX_QUEUE_MAPPING=y
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is undefined
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is undefined
 # CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is undefined
-# CONFIG_SQUASHFS_DECOMP_SINGLE is undefined
+# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is undefined
 # CONFIG_SQUASHFS_EMBEDDED is undefined
 # CONFIG_SQUASHFS_FILE_CACHE is undefined
 # CONFIG_SQUASHFS_FILE_DIRECT is undefined
diff --git a/configs/platform-mipsel/kernelconfig b/configs/platform-mipsel/kernelconfig
index 117c56cca057..1f9edd76de9b 100644
--- a/configs/platform-mipsel/kernelconfig
+++ b/configs/platform-mipsel/kernelconfig
@@ -2681,13 +2681,13 @@ CONFIG_UBIFS_FS_SECURITY=y
 # CONFIG_UBIFS_FS_AUTHENTICATION is not set
 # CONFIG_CRAMFS is not set
 CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_FILE_CACHE is not set
+CONFIG_SQUASHFS_FILE_DIRECT=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_LZ4 is not set
diff --git a/configs/platform-mipsel/kernelconfig-malta.diff b/configs/platform-mipsel/kernelconfig-malta.diff
index 15b80d0fafd8..a8ee88c1017c 100644
--- a/configs/platform-mipsel/kernelconfig-malta.diff
+++ b/configs/platform-mipsel/kernelconfig-malta.diff
@@ -1,4 +1,4 @@
-9b8cb4d1395ae94191677a625040e2fa
+17fe512614955c6a3a288ec4e2d08bc8
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
 # CONFIG_ACENIC is not set
@@ -1535,7 +1535,7 @@ CONFIG_SMSC_PHY=m
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is undefined
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is undefined
 # CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is undefined
-# CONFIG_SQUASHFS_DECOMP_SINGLE is undefined
+# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is undefined
 # CONFIG_SQUASHFS_EMBEDDED is undefined
 # CONFIG_SQUASHFS_FILE_CACHE is undefined
 # CONFIG_SQUASHFS_FILE_DIRECT is undefined
diff --git a/configs/platform-rpi1/kernelconfig b/configs/platform-rpi1/kernelconfig
index 29ea46525108..00795f8b3074 100644
--- a/configs/platform-rpi1/kernelconfig
+++ b/configs/platform-rpi1/kernelconfig
@@ -3454,13 +3454,13 @@ CONFIG_UBIFS_FS_SECURITY=y
 # CONFIG_UBIFS_FS_AUTHENTICATION is not set
 # CONFIG_CRAMFS is not set
 CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_FILE_CACHE is not set
+CONFIG_SQUASHFS_FILE_DIRECT=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_LZ4 is not set
diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index 5f12b549580c..f59ceb5a4bdd 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -3737,12 +3737,11 @@ CONFIG_UBIFS_FS_XATTR=y
 CONFIG_SQUASHFS=y
 # CONFIG_SQUASHFS_FILE_CACHE is not set
 CONFIG_SQUASHFS_FILE_DIRECT=y
-CONFIG_SQUASHFS_DECOMP_MULTI=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI=y
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
-# CONFIG_SQUASHFS_MOUNT_DECOMP_THREADS is not set
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 CONFIG_SQUASHFS_LZ4=y
diff --git a/configs/platform-v7a_noneon/kernelconfig b/configs/platform-v7a_noneon/kernelconfig
index 0600fcb1c2cd..3cb360535d23 100644
--- a/configs/platform-v7a_noneon/kernelconfig
+++ b/configs/platform-v7a_noneon/kernelconfig
@@ -3343,13 +3343,13 @@ CONFIG_UBIFS_FS_SECURITY=y
 # CONFIG_UBIFS_FS_AUTHENTICATION is not set
 # CONFIG_CRAMFS is not set
 CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_FILE_CACHE is not set
+CONFIG_SQUASHFS_FILE_DIRECT=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_LZ4 is not set
diff --git a/configs/platform-x86_64/kernelconfig b/configs/platform-x86_64/kernelconfig
index 6ad5ef703289..22a8433f7cea 100644
--- a/configs/platform-x86_64/kernelconfig
+++ b/configs/platform-x86_64/kernelconfig
@@ -3515,13 +3515,13 @@ CONFIG_UBIFS_FS_SECURITY=y
 # CONFIG_UBIFS_FS_AUTHENTICATION is not set
 # CONFIG_CRAMFS is not set
 CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_FILE_CACHE is not set
+CONFIG_SQUASHFS_FILE_DIRECT=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
 # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_XATTR is not set
 CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_LZ4 is not set
-- 
2.39.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-14 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14 10:07 [DistroKit] [PATCH] platforms: kernel: optimise squashfs decompression Roland Hieber
2024-08-14 10:13 ` Robert Schwebel
2024-08-14 10:15   ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox