Do not change badness if oom_score=0

This commit is contained in:
Alexey Avramov 2020-02-21 23:56:36 +09:00
parent 4925df0828
commit 8eb65df15a

View File

@ -995,6 +995,10 @@ def pid_to_badness(pid):
oom_score_adj = None oom_score_adj = None
try: try:
oom_score = int(rline1('/proc/' + pid + '/oom_score')) oom_score = int(rline1('/proc/' + pid + '/oom_score'))
if oom_score == 0:
return oom_score, oom_score
badness = oom_score badness = oom_score
if ignore_positive_oom_score_adj: if ignore_positive_oom_score_adj: