mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
contrib/check-config: fix MEMCG_SWAP
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>
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user