From df8d45c7c94351fcfdf950823d025dd256cbcab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AF=E7=9C=9F?= <38834411+chunzhennn@users.noreply.github.com> Date: Tue, 29 Jul 2025 10:30:13 +0800 Subject: [PATCH 1/2] contrib/check-config: fix MEMCG_SWAP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- contrib/check-config.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/check-config.sh b/contrib/check-config.sh index e3b3d87b76..a6455a936d 100755 --- a/contrib/check-config.sh +++ b/contrib/check-config.sh @@ -246,11 +246,10 @@ echo 'Optional Features:' check_flags CGROUP_PIDS } { - check_flags MEMCG_SWAP - # Kernel v5.8+ removes MEMCG_SWAP_ENABLED. + # Kernel v5.8+ removes MEMCG_SWAP_ENABLED and deprecates MEMCG_SWAP. if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 8 ]; then CODE=${EXITCODE} - check_flags MEMCG_SWAP_ENABLED + check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED # FIXME this check is cgroupv1-specific if [ -e /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes ]; then echo " $(wrap_color '(cgroup swap accounting is currently enabled)' bold black)" From f86662130315da69412911fc6aa87238e82da19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AF=E7=9C=9F?= <38834411+chunzhennn@users.noreply.github.com> Date: Tue, 29 Jul 2025 10:45:18 +0800 Subject: [PATCH 2/2] contrib/check-config: fix kernel version range check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 纯真 <38834411+chunzhennn@users.noreply.github.com> --- contrib/check-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/check-config.sh b/contrib/check-config.sh index a6455a936d..167b8065d2 100755 --- a/contrib/check-config.sh +++ b/contrib/check-config.sh @@ -247,7 +247,7 @@ echo 'Optional Features:' } { # Kernel v5.8+ removes MEMCG_SWAP_ENABLED and deprecates MEMCG_SWAP. - if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 8 ]; then + if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -lt 8 ]; then CODE=${EXITCODE} check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED # FIXME this check is cgroupv1-specific