summaryrefslogtreecommitdiff
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-04-03 02:22:11 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-04-03 02:22:11 +0400
commitcd02938a828f4b2098a074afb7454f106f2e8df5 (patch)
tree7b543fd6aa82a62dc3a9614c26f89daca83e77d5 /mm/oom_kill.c
parent9d681f3a1b27fdfc17ea251cf8d5f627dab34670 (diff)
parent172ef275444efa12d834fb9d1b1acdac92db47f7 (diff)
downloadlinux-cd02938a828f4b2098a074afb7454f106f2e8df5.tar.xz
Merge branch 'smsc911x-armplatforms' of git://github.com/steveglen/linux-2.6
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 40ba05061a4f..d3b9bac085b5 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -55,7 +55,7 @@ static DEFINE_SPINLOCK(zone_scan_lock);
unsigned long badness(struct task_struct *p, unsigned long uptime)
{
- unsigned long points, cpu_time, run_time, s;
+ unsigned long points, cpu_time, run_time;
struct mm_struct *mm;
struct task_struct *child;
@@ -110,12 +110,10 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
else
run_time = 0;
- s = int_sqrt(cpu_time);
- if (s)
- points /= s;
- s = int_sqrt(int_sqrt(run_time));
- if (s)
- points /= s;
+ if (cpu_time)
+ points /= int_sqrt(cpu_time);
+ if (run_time)
+ points /= int_sqrt(int_sqrt(run_time));
/*
* Niced processes are most likely less important, so double