Skip to content

Conversation

fwilhe
Copy link
Member

@fwilhe fwilhe commented Jan 21, 2025

What this PR does / why we need it:

Back porting #67 for the 6.6 line

Which issue(s) this PR fixes:
Fixes #66

@fwilhe fwilhe requested a review from gehoern January 21, 2025 13:27
@pnpavlov pnpavlov added this to the 2025-01 milestone Jan 21, 2025
@pnpavlov
Copy link
Member

@gehoern , can you please review and confirm if this change should be also in 6.6 (therefore 1443 and 1592 upcoming patches) or only in the 17 release?

@nkraetzschmar
Copy link
Contributor

my 2 cents:

  • enable the options: sure, why not
  • change the default: maybe not.... while zstd gets you very good compression ratios there is far more overhead compared to lz4, so default lz4 is probably preferred

@fwilhe
Copy link
Member Author

fwilhe commented Jan 27, 2025

@nkraetzschmar fyi, this is the pr for 6.6., on main for 6.12 it is already merged with the same default. No one objected to that before, if you would like to change this before we release a new version, please put that forward.

Comment on lines +406 to +409
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_LZ4HC=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are not defined in Linux 6.6.79

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I thought I checked this, but maybe I made a mistake there.

Thanks for pointing that out.

Shall we close the PR, or is there a sensible replacement for those configs?

Copy link
Contributor

@Vincinator Vincinator Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In linux 6.6 the crypto submodule provides an interface to the compression algorithms defined in lib, e.g lib/lz4.

In 6.6 we have a chain:

Will check tomorrow what we need to enable in our configs

The interface changed in later kernel versions to a dedicated ZRAM compression backend with this patch series

Copy link
Contributor

@Vincinator Vincinator Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the non-cloud kernel we have

CONFIG_ZRAM=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_LZ4HC=m
CONFIG_CRYPTO_ZSTD=m

(see here)

So it should be possible with 6.6, also according to the linked issue and the mentioned debian bug report (since we do not automatically pull in Debian's kernel config, but explicitly define all configs in our source tree, I double checked)

Starting with kernel 6.12 ZSTD compression is no longer available for ZRAM.
It used to be available by default.

So I would agree with closing this PR for now

@fwilhe fwilhe marked this pull request as draft February 25, 2025 09:32
@pnpavlov pnpavlov modified the milestones: 2025-01, 2025-03 Feb 27, 2025
Base automatically changed from maint-6.6 to rel-1592 June 30, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants