Skip to content

Commit e1db111

Browse files
authored
feat(kernel): Enable lz4, lz4hc and zstd zram compression (#16268)
Enabling the kernel Crypto API compression modules for LZ4, LZ4HC, and ZSTD expands our supported zram compression options so we can tune memory-compression behavior per workload across our x86_64 and aarch64 fleet. This change is intended as a performance and resilience improvement (compression-only) rather than a security feature, and it helps avoid a one-size-fits-all compression choice by allowing us to standardize on the best algorithm per environment based on measured results. Note that the default option has not changed and new compression algorithms need to be explicitly set. root [ /home/azureuser ]# modprobe zram root [ /home/azureuser ]# cat /sys/block/zram0/comp_algorithm lzo [lzo-rle] lz4 lz4hc zstd
1 parent d0c06aa commit e1db111

19 files changed

Lines changed: 101 additions & 29 deletions

File tree

SPECS-EXTENDED/kernel-ipe/config

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,10 @@ CONFIG_CDROM=y
21202120
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
21212121
CONFIG_ZRAM=m
21222122
CONFIG_ZRAM_DEF_COMP_LZORLE=y
2123+
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
2124+
# CONFIG_ZRAM_DEF_COMP_LZ4 is not set
21232125
# CONFIG_ZRAM_DEF_COMP_LZO is not set
2126+
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
21242127
CONFIG_ZRAM_DEF_COMP="lzo-rle"
21252128
# CONFIG_ZRAM_WRITEBACK is not set
21262129
# CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set
@@ -7624,9 +7627,9 @@ CONFIG_CRYPTO_CRC64_ROCKSOFT=y
76247627
CONFIG_CRYPTO_DEFLATE=y
76257628
CONFIG_CRYPTO_LZO=m
76267629
# CONFIG_CRYPTO_842 is not set
7627-
# CONFIG_CRYPTO_LZ4 is not set
7628-
# CONFIG_CRYPTO_LZ4HC is not set
7629-
# CONFIG_CRYPTO_ZSTD is not set
7630+
CONFIG_CRYPTO_LZ4=m
7631+
CONFIG_CRYPTO_LZ4HC=m
7632+
CONFIG_CRYPTO_ZSTD=m
76307633
# end of Compression
76317634

76327635
#
@@ -7814,6 +7817,8 @@ CONFIG_ZLIB_INFLATE=y
78147817
CONFIG_ZLIB_DEFLATE=y
78157818
CONFIG_LZO_COMPRESS=y
78167819
CONFIG_LZO_DECOMPRESS=y
7820+
CONFIG_LZ4_COMPRESS=m
7821+
CONFIG_LZ4HC_COMPRESS=m
78177822
CONFIG_LZ4_DECOMPRESS=y
78187823
CONFIG_ZSTD_COMMON=y
78197824
CONFIG_ZSTD_COMPRESS=y

SPECS-EXTENDED/kernel-ipe/config_aarch64

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,7 +2623,10 @@ CONFIG_CDROM=y
26232623
CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m
26242624
CONFIG_ZRAM=m
26252625
CONFIG_ZRAM_DEF_COMP_LZORLE=y
2626+
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
2627+
# CONFIG_ZRAM_DEF_COMP_LZ4 is not set
26262628
# CONFIG_ZRAM_DEF_COMP_LZO is not set
2629+
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
26272630
CONFIG_ZRAM_DEF_COMP="lzo-rle"
26282631
CONFIG_ZRAM_WRITEBACK=y
26292632
CONFIG_ZRAM_TRACK_ENTRY_ACTIME=y
@@ -10670,9 +10673,9 @@ CONFIG_CRYPTO_CRC64_ROCKSOFT=y
1067010673
CONFIG_CRYPTO_DEFLATE=y
1067110674
CONFIG_CRYPTO_LZO=y
1067210675
# CONFIG_CRYPTO_842 is not set
10673-
# CONFIG_CRYPTO_LZ4 is not set
10674-
# CONFIG_CRYPTO_LZ4HC is not set
10675-
# CONFIG_CRYPTO_ZSTD is not set
10676+
CONFIG_CRYPTO_LZ4=m
10677+
CONFIG_CRYPTO_LZ4HC=m
10678+
CONFIG_CRYPTO_ZSTD=m
1067610679
# end of Compression
1067710680

1067810681
#
@@ -10898,6 +10901,8 @@ CONFIG_ZLIB_INFLATE=y
1089810901
CONFIG_ZLIB_DEFLATE=y
1089910902
CONFIG_LZO_COMPRESS=y
1090010903
CONFIG_LZO_DECOMPRESS=y
10904+
CONFIG_LZ4_COMPRESS=m
10905+
CONFIG_LZ4HC_COMPRESS=m
1090110906
CONFIG_LZ4_DECOMPRESS=y
1090210907
CONFIG_ZSTD_COMMON=y
1090310908
CONFIG_ZSTD_COMPRESS=y

SPECS-EXTENDED/kernel-ipe/kernel-ipe.signatures.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"Signatures": {
33
"azurelinux-ca-20230216.pem": "d545401163c75878319f01470455e6bc18a5968e39dd964323225e3fe308849b",
4-
"config": "fa72aff3417a681f94bd806af0b4d2ea41212850622ffa1ff36b190f1b1840bb",
5-
"config_aarch64": "fe90e2734c173a5b51d0d50093980469ac395e424d35018df917710f5538ddd9",
4+
"config": "81273f51a48a9fbe92fa79a46e8213d9b0330e7ef910e7869896ad0efef14464",
5+
"config_aarch64": "3c09dcb2fe25108868f2162a7e50374c3ab1bf18542fb29f98f53654d655f61f",
66
"cpupower": "d7518767bf2b1110d146a49c7d42e76b803f45eb8bd14d931aa6d0d346fae985",
77
"cpupower.service": "b057fe9e5d0e8c36f485818286b80e3eba8ff66ff44797940e99b1fd5361bb98",
88
"sha512hmac-openssl.sh": "02ab91329c4be09ee66d759e4d23ac875037c3b56e5a598e32fd1206da06a27f",

SPECS-EXTENDED/kernel-ipe/kernel-ipe.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
Summary: Linux Kernel
3434
Name: kernel-ipe
3535
Version: 6.6.129.1
36-
Release: 1%{?dist}
36+
Release: 2%{?dist}
3737
License: GPLv2
3838
Vendor: Microsoft Corporation
3939
Distribution: Azure Linux
@@ -460,6 +460,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
460460
%{_sysconfdir}/bash_completion.d/bpftool
461461

462462
%changelog
463+
* Tue Mar 24 2026 Rachel Menge <rachelmenge@microsoft.com> - 6.6.129.1-2
464+
- Enable lz4, lz4hc, and zstd zram compression
465+
463466
* Thu Mar 12 2026 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 6.6.129.1-1
464467
- Auto-upgrade to 6.6.129.1
465468

SPECS-SIGNED/kernel-64k-signed/kernel-64k-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Summary: Signed Linux Kernel for %{buildarch} systems
88
Name: kernel-64k-signed-%{buildarch}
99
Version: 6.6.129.1
10-
Release: 1%{?dist}
10+
Release: 2%{?dist}
1111
License: GPLv2
1212
Vendor: Microsoft Corporation
1313
Distribution: Azure Linux
@@ -105,6 +105,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
105105
%exclude /module_info.ld
106106

107107
%changelog
108+
* Tue Mar 24 2026 Rachel Menge <rachelmenge@microsoft.com> - 6.6.129.1-2
109+
- Bump release to match kernel,kernel-ipe
110+
108111
* Thu Mar 12 2026 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 6.6.129.1-1
109112
- Auto-upgrade to 6.6.129.1
110113

SPECS-SIGNED/kernel-signed/kernel-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Summary: Signed Linux Kernel for %{buildarch} systems
1111
Name: kernel-signed-%{buildarch}
1212
Version: 6.6.129.1
13-
Release: 1%{?dist}
13+
Release: 2%{?dist}
1414
License: GPLv2
1515
Vendor: Microsoft Corporation
1616
Distribution: Azure Linux
@@ -145,6 +145,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
145145
%exclude /module_info.ld
146146

147147
%changelog
148+
* Tue Mar 24 2026 Rachel Menge <rachelmenge@microsoft.com> - 6.6.129.1-2
149+
- Bump release to match kernel,kernel-ipe
150+
148151
* Thu Mar 12 2026 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 6.6.129.1-1
149152
- Auto-upgrade to 6.6.129.1
150153

SPECS-SIGNED/kernel-uki-signed/kernel-uki-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Signed Unified Kernel Image for %{buildarch} systems
77
Name: kernel-uki-signed-%{buildarch}
88
Version: 6.6.129.1
9-
Release: 1%{?dist}
9+
Release: 2%{?dist}
1010
License: GPLv2
1111
Vendor: Microsoft Corporation
1212
Distribution: Azure Linux
@@ -68,6 +68,9 @@ popd
6868
/boot/efi/EFI/Linux/vmlinuz-uki-%{kernelver}.efi
6969

7070
%changelog
71+
* Tue Mar 24 2026 Rachel Menge <rachelmenge@microsoft.com> - 6.6.129.1-2
72+
- Bump release to match kernel,kernel-ipe
73+
7174
* Thu Mar 12 2026 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 6.6.129.1-1
7275
- Auto-upgrade to 6.6.129.1
7376

SPECS/kernel-64k/kernel-64k.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
Summary: Linux Kernel
2828
Name: kernel-64k
2929
Version: 6.6.129.1
30-
Release: 1%{?dist}
30+
Release: 2%{?dist}
3131
License: GPLv2
3232
Vendor: Microsoft Corporation
3333
Distribution: Azure Linux
@@ -380,6 +380,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
380380
%{_sysconfdir}/bash_completion.d/bpftool
381381

382382
%changelog
383+
* Tue Mar 24 2026 Rachel Menge <rachelmenge@microsoft.com> - 6.6.129.1-2
384+
- Bump release to match kernel,kernel-ipe
385+
383386
* Thu Mar 12 2026 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 6.6.129.1-1
384387
- Auto-upgrade to 6.6.129.1
385388

SPECS/kernel-headers/kernel-headers.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Summary: Linux API header files
1515
Name: kernel-headers
1616
Version: 6.6.129.1
17-
Release: 1%{?dist}
17+
Release: 2%{?dist}
1818
License: GPLv2
1919
Vendor: Microsoft Corporation
2020
Distribution: Azure Linux
@@ -75,6 +75,9 @@ done
7575
%endif
7676

7777
%changelog
78+
* Tue Mar 24 2026 Rachel Menge <rachelmenge@microsoft.com> - 6.6.129.1-2
79+
- Bump release to match kernel,kernel-ipe
80+
7881
* Thu Mar 12 2026 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 6.6.129.1-1
7982
- Auto-upgrade to 6.6.129.1
8083

SPECS/kernel/config

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,10 @@ CONFIG_CDROM=y
21202120
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
21212121
CONFIG_ZRAM=m
21222122
CONFIG_ZRAM_DEF_COMP_LZORLE=y
2123+
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
2124+
# CONFIG_ZRAM_DEF_COMP_LZ4 is not set
21232125
# CONFIG_ZRAM_DEF_COMP_LZO is not set
2126+
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
21242127
CONFIG_ZRAM_DEF_COMP="lzo-rle"
21252128
# CONFIG_ZRAM_WRITEBACK is not set
21262129
# CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set
@@ -7624,9 +7627,9 @@ CONFIG_CRYPTO_CRC64_ROCKSOFT=y
76247627
CONFIG_CRYPTO_DEFLATE=y
76257628
CONFIG_CRYPTO_LZO=m
76267629
# CONFIG_CRYPTO_842 is not set
7627-
# CONFIG_CRYPTO_LZ4 is not set
7628-
# CONFIG_CRYPTO_LZ4HC is not set
7629-
# CONFIG_CRYPTO_ZSTD is not set
7630+
CONFIG_CRYPTO_LZ4=m
7631+
CONFIG_CRYPTO_LZ4HC=m
7632+
CONFIG_CRYPTO_ZSTD=m
76307633
# end of Compression
76317634

76327635
#
@@ -7814,6 +7817,8 @@ CONFIG_ZLIB_INFLATE=y
78147817
CONFIG_ZLIB_DEFLATE=y
78157818
CONFIG_LZO_COMPRESS=y
78167819
CONFIG_LZO_DECOMPRESS=y
7820+
CONFIG_LZ4_COMPRESS=m
7821+
CONFIG_LZ4HC_COMPRESS=m
78177822
CONFIG_LZ4_DECOMPRESS=y
78187823
CONFIG_ZSTD_COMMON=y
78197824
CONFIG_ZSTD_COMPRESS=y

0 commit comments

Comments
 (0)