Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9a82782f8f58219d0c6dc5f0211ce301adf6c6f4
Commit:     9a82782f8f58219d0c6dc5f0211ce301adf6c6f4
Parent:     3d67f2d7c0fb28b0eb6a6aa100b190526a971ad9
Author:     Joshua N Pritikin <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:49:07 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:12:51 2007 -0700

    allow oom_adj of saintly processes
    
    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.
    
    Signed-off-by: Joshua N. Pritikin <[EMAIL PROTECTED]>
    Cc: Andrea Arcangeli <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/oom_kill.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 3791edf..a35e7a8 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -147,9 +147,11 @@ unsigned long badness(struct task_struct *p, unsigned long 
uptime)
         * 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 from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to