X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=mm%2Foom_kill.c;h=85e39c630a10cc236874eae6f45a00239c228ec8;hp=76f2c5ae908e85a858c006d932edcdf9128e0cc2;hb=refs%2Fheads%2Fpandora-3.2-.57-wip;hpb=42a3b63bb2ca4996a3d1210a004eae2333f1119e diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 76f2c5ae908e..85e39c630a10 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -143,6 +143,7 @@ struct task_struct *find_lock_task_mm(struct task_struct *p) return NULL; } +EXPORT_SYMBOL_GPL(find_lock_task_mm); /* return true if the task is not adequate as candidate victim task. */ static bool oom_unkillable_task(struct task_struct *p, @@ -176,7 +177,7 @@ static bool oom_unkillable_task(struct task_struct *p, unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem, const nodemask_t *nodemask, unsigned long totalpages) { - int points; + long points; if (oom_unkillable_task(p, mem, nodemask)) return 0; @@ -213,7 +214,7 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem, * implementation used by LSMs. */ if (has_capability_noaudit(p, CAP_SYS_ADMIN)) - points -= 30; + points -= (points * 3) / 100; /* * /proc/pid/oom_score_adj ranges from -1000 to +1000 such that it may