diff options
| author | Liam Mark <lmark@codeaurora.org> | 2014-04-21 17:16:11 -0700 |
|---|---|---|
| committer | Vinayak Menon <vinmenon@codeaurora.org> | 2017-02-16 10:13:46 +0530 |
| commit | 334dad34a60d4336bb8e2d918b0729299efd5e84 (patch) | |
| tree | 07ccce4c7ecb5a5b51f05acce142687f1d282ccd /include/linux/compiler-gcc.h | |
| parent | 3ba1a36ad812171629b91f5a49e486b2529c22a2 (diff) | |
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>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Diffstat (limited to 'include/linux/compiler-gcc.h')
0 files changed, 0 insertions, 0 deletions
