proc: fix conversion of oom_score_adj to oom_adj
Ensure that oom_score_adj values are properly converted to
oom_adj values by rounding appropriately.
When there is an attempt to calculate an oom_adj value from its
oom_score_adj value the lack of precision results in an oom_adj
value that is one less than it should be.
For example the oom_adj calculated from oom_score_adj 117 is
calculated as 1.989 (117*17 / 1000), and this is rounded to
1 (and not 2 as it should be).
By properly generating oom_adj values backward compatibility is
better supported.
Change-Id: I7f102cf445e572b8e855a9d6b0cf91e3c438eabf
Signed-off-by:
Liam Mark <lmark@codeaurora.org>
Loading
Please register or sign in to comment