moby/libcontainerd
Sebastiaan van Stijn cf7a5be0f2
daemon: don't adjust oom-score if score is 0
This patch makes two changes if --oom-score-adj is set to 0

- do not adjust the oom-score-adjust cgroup for dockerd
- do not set the hard-coded -999 score for containerd if
  containerd is running as child process

Before this change:

oom-score-adj | dockerd       | containerd as child-process
--------------|---------------|----------------------------
-             | -500          | -500 (same as dockerd)
-100          | -100          | -100 (same as dockerd)
 0            |  0            | -999 (hard-coded default)

With this change:

oom-score-adj | dockerd       | containerd as child-process
--------------|---------------|----------------------------
-             | -500          | -500 (same as dockerd)
-100          | -100          | -100 (same as dockerd)
0             | not adjusted  | not adjusted

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-05 19:52:02 +02:00
..
local Configure shims from runtime config 2020-07-13 14:18:02 -07:00
queue bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
remote libcontainerd: use cancellable context for events 2020-08-12 17:09:21 +00:00
supervisor daemon: don't adjust oom-score if score is 0 2020-10-05 19:52:02 +02:00
types Configure shims from runtime config 2020-07-13 14:18:02 -07:00
libcontainerd_linux.go Configure shims from runtime config 2020-07-13 14:18:02 -07:00
libcontainerd_windows.go Remove unused useShimV2() 2020-07-15 14:28:48 +02:00