aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorDavid Rientjes <[email protected]>2012-06-20 12:52:58 -0700
committerLinus Torvalds <[email protected]>2012-06-20 14:39:35 -0700
commit61eafb00d55dfbccdfce543c6b60e369ff4f8f18 (patch)
treee2be309a7412de35dd8414ea030b6650d2ea8b75 /tools/perf/util/scripting-engines/trace-event-python.c
parentfbb24a3a915f105016f1c828476be11aceac8504 (diff)
mm, oom: fix and cleanup oom score calculations
The divide in p->signal->oom_score_adj * totalpages / 1000 within oom_badness() was causing an overflow of the signed long data type. This adds both the root bias and p->signal->oom_score_adj before doing the normalization which fixes the issue and also cleans up the calculation. Tested-by: Dave Jones <[email protected]> Signed-off-by: David Rientjes <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions