1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #41527 from thaJeztah/no_oom_score_adj

daemon: don't adjust oom-score if score is 0
This commit is contained in:
Tibor Vass 2020-10-15 15:00:18 -07:00 committed by GitHub
commit cf867587b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1636,6 +1636,9 @@ func setMayDetachMounts() error {
}
func setupOOMScoreAdj(score int) error {
if score == 0 {
return nil
}
f, err := os.OpenFile("/proc/self/oom_score_adj", os.O_WRONLY, 0)
if err != nil {
return err

View file

@ -28,9 +28,6 @@ func (r *remote) setDefaults() {
if r.Debug.Address == "" {
r.Debug.Address = filepath.Join(r.stateDir, debugSockFile)
}
if r.OOMScore == 0 {
r.OOMScore = -999
}
for key, conf := range r.pluginConfs.Plugins {
if conf == nil {