diff --git a/api/swagger.yaml b/api/swagger.yaml index 49dda13769031aea50a61457ace20cd121e29b5d..d393258c8668e64d09b61b03242fa244f6f284d5 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -4468,6 +4468,14 @@ definitions: > `kmem.limit_in_bytes`. type: "boolean" example: true + KernelMemoryTCP: + description: | + Indicates if the host has kernel memory TCP limit support enabled. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + type: "boolean" + example: true CpuCfsPeriod: description: | Indicates if CPU CFS(Completely Fair Scheduler) period is supported by diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 1aabe1d9fd32c77d6f05bc4576c8855032471fdd..e5c6dbbc5ad739c472ea0b75761b3c5b2cf7f382 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -452,7 +452,7 @@ func verifyPlatformContainerResources(resources *containertypes.Resources, sysIn resources.KernelMemory = 0 } if resources.KernelMemory > 0 && resources.KernelMemory < linuxMinMemory { - return warnings, fmt.Errorf("Minimum kernel memory limit allowed is 4MB") + return warnings, fmt.Errorf("Minimum kernel memory limit allowed is 6MB") } if resources.KernelMemory > 0 && !kernel.CheckKernelVersion(4, 0, 0) { warnings = append(warnings, "You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.") diff --git a/docs/api/v1.40.yaml b/docs/api/v1.40.yaml index a688b5efa33b2de677b1dfcf1e741add3bcbe8eb..6befe944a45657de1ab235dbbfa10408d10b5929 100644 --- a/docs/api/v1.40.yaml +++ b/docs/api/v1.40.yaml @@ -4346,6 +4346,14 @@ definitions: description: "Indicates if the host has kernel memory limit support enabled." type: "boolean" example: true + KernelMemoryTCP: + description: | + Indicates if the host has kernel memory TCP limit support enabled. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + type: "boolean" + example: true CpuCfsPeriod: description: | Indicates if CPU CFS(Completely Fair Scheduler) period is supported by diff --git a/docs/api/v1.41.yaml b/docs/api/v1.41.yaml index 12c56243968d419c3bb4bf36777c572fd8efc960..32f7e528c3e78f62c05348f4569ac43a62b0f600 100644 --- a/docs/api/v1.41.yaml +++ b/docs/api/v1.41.yaml @@ -4467,6 +4467,14 @@ definitions: > `kmem.limit_in_bytes`. type: "boolean" example: true + KernelMemoryTCP: + description: | + Indicates if the host has kernel memory TCP limit support enabled. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + type: "boolean" + example: true CpuCfsPeriod: description: | Indicates if CPU CFS(Completely Fair Scheduler) period is supported by