Do not change badness if oom_score=0
This commit is contained in:
parent
4925df0828
commit
8eb65df15a
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user