* [PATCH] allow oom_adj of saintly processes
@ 2007-02-18 9:43 Joshua N Pritikin
0 siblings, 0 replies; only message in thread
From: Joshua N Pritikin @ 2007-02-18 9:43 UTC (permalink / raw)
To: linux-mm
If the badness of a process is zero then oom_adj>0 has no effect. This
patch makes sure that the oom_adj shift actually increases badness
points appropriately.
I am not subscribed. Please CC me with any comments. Thanks.
Signed-off-by: Joshua N. Pritikin <jpritikin@pobox.com>
--- linux/mm/oom_kill.c.orig 2007-02-18 14:58:35.000000000 +0530
+++ linux/mm/oom_kill.c 2007-02-18 14:57:52.000000000 +0530
@@ -147,9 +147,11 @@ unsigned long badness(struct task_struct
* Adjust the score by oomkilladj.
*/
if (p->oomkilladj) {
- if (p->oomkilladj > 0)
+ if (p->oomkilladj > 0) {
+ if (!points)
+ points = 1;
points <<= p->oomkilladj;
- else
+ } else
points >>= -(p->oomkilladj);
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-18 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-18 9:43 [PATCH] allow oom_adj of saintly processes Joshua N Pritikin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).