mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
script/check-config.sh: fix MEMCG_SWAP_ENABLED
Kernel commit 2d1c498072de69e (which made its way into kernel v5.8-rc1) removed CONFIG_MEMCG_SWAP_ENABLED Kconfig option, making swap accounting always enabled (unless swapaccount=0 boot option is provided). Make the check conditional. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -230,9 +230,13 @@ echo 'Optional Features:'
|
||||
check_flags SECCOMP
|
||||
check_flags CGROUP_PIDS
|
||||
|
||||
check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED
|
||||
if is_set MEMCG_SWAP && ! is_set MEMCG_SWAP_ENABLED; then
|
||||
echo " $(wrap_color '(note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")' bold black)"
|
||||
check_flags MEMCG_SWAP
|
||||
|
||||
if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 8 ]; then
|
||||
check_flags MEMCG_SWAP_ENABLED
|
||||
if is_set MEMCG_SWAP && ! is_set MEMCG_SWAP_ENABLED; then
|
||||
echo " $(wrap_color '(note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")' bold black)"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user