Re: [PATCH 2.6.11-rc4] oom_kill.c: Kill obvious processes first

From: Bill Davidsen (davidsen_at_tmr.com)
Date: 02/28/05

  • Next message: Henrik Brix Andersen: "Re: Support for GEODE CPU's in Kernel 2.6.10."
    Date:	Mon, 28 Feb 2005 17:30:53 -0500
    To: Parag Warudkar <kernel-stuff@comcast.net>
    
    

    Parag Warudkar wrote:
    > oom_kill.c misses very obvious targets - For example, a process occupying >
    > 80% memory, not superuser and not having hardware access gets ignored by it.
    > Logically, such a process, if killed , is going to make things return to
    > normal thereby eliminating the need for oom killer to further scan for more
    > processes.
    >
    > This patch calculates the approximate integer percentage of memory occupied by
    > the process by looking at num_physpages and p->mm->total_vm. If this process
    > is not super user and doesn't have hardware access, and the percentage of
    > occupied memory is more than 60%, it immediately selects this process for
    > killing by returning unusually high points from badness().
    >
    > Without this patch, when KDevelop running as non root user gobbles up 90%
    > memory, the OOM killer kills many other irrelevant processes but not KDevelop
    > And machine never recovers.. (Pls see LKML for my previous message with
    > subject "2.6.11-rc4 OOM Killer - Kill the Innocent".)
    >
    > With this patch OOM killer immediately kills kdevelop and machine recovers.

    Thank you for the patch, I'm in agreement with the idea, and I'll give
    it a try after I look at the code a bit. The current code frequently
    seems bit... non-deterministic.

    -- 
        -bill davidsen (davidsen@tmr.com)
    "The secret to procrastination is to put things off until the
      last possible moment - but no longer"  -me
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Henrik Brix Andersen: "Re: Support for GEODE CPU's in Kernel 2.6.10."

    Relevant Pages