Skip to content

contrib/check-config: fix MEMCG_SWAP checking#50555

Merged
thaJeztah merged 2 commits intomoby:masterfrom
chunzhennn:49231-fix-memcg-swap-config-check
Aug 5, 2025
Merged

contrib/check-config: fix MEMCG_SWAP checking#50555
thaJeztah merged 2 commits intomoby:masterfrom
chunzhennn:49231-fix-memcg-swap-config-check

Conversation

@chunzhennn
Copy link
Contributor

@chunzhennn chunzhennn commented Jul 29, 2025

- What I did

CONFIG_MEMCG_SWAP has been deprecated since kernel v5.8-rc1 (commit 2d1c498) and removed since kernel v6.1-rc1 (commit e55b9f9).

Since kernel v5.8-rc1, swap tracking has been an integral part of memory control. CONFIG_MEMCG_SWAP becomes invisible to user and simply means CONFIG_MEMCG && CONFIG_SWAP.

This PR disables the check for kernel v5.8+, and fixes a tiny bug in kernel version range check.

Closes #49231 .

I made mistakes in branch name of #50553 , so I opened another PR.

- A picture of a cute animal (not mandatory but encouraged)

ฅ^•ﻌ•^ฅ

CONFIG_MEMCG_SWAP has been deprecated since kernel v5.8-rc1 (commit 2d1c498) and removed since kernel v6.1-rc1 (commit e55b9f9).

Since kernel v5.8-rc1, swap tracking has been an integral part of memory control. CONFIG_MEMCG_SWAP becomes invisible to user and simply means CONFIG_MEMCG && CONFIG_SWAP. 

Disable the check for kernel v5.8+.

Signed-off-by: 纯真 <38834411+chunzhennn@users.noreply.github.com>
Signed-off-by: 纯真 <38834411+chunzhennn@users.noreply.github.com>
@thaJeztah
Copy link
Member

/cc @vvoland @robmry ptal

Copy link
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

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

LGTM - thank you @chunzhennn.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM as well, thanks!

@thaJeztah thaJeztah merged commit 141a97b into moby:master Aug 5, 2025
195 of 196 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check-config.sh script, CONFIG_MEMCG_SWAP is deprecated and have been removed!

3 participants