lkml.org 
[lkml]   [2003]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2.4.21-rc4] Fix oom killer braindamage
    Date
    Hi Marcelo,

    attached patch fixes the oom killer braindamage where it tries to kill
    processes again and again and again w/o any ending or successfull killing of
    the selected processes in an OOM case.

    The attached, very simple but effective, patch fixes it.

    All the kudos go to Rik van Riel.

    Patch tested and works, and also for a long time in my tree (and maybe also
    others?!)

    This issue is out there for several years.

    Please consider it for 2.4.21-rc5, thanks.

    ciao, Marc




    ===== mm/oom_kill.c 1.11 vs edited =====
    --- 1.11/mm/oom_kill.c Fri Aug 16 10:59:46 2002
    +++ edited/mm/oom_kill.c Sat Feb 22 17:31:49 2003
    @@ -61,11 +61,16 @@ static int badness(struct task_struct *p

    if (!p->mm)
    return 0;
    +
    + if (p->flags & PF_MEMDIE)
    + return 0;
    +
    /*
    * Never kill init
    */
    if (p->pid == 1)
    return 0;
    +
    /*
    * The memory size of the process is the basis for the badness.
    */
    \
     
     \ /
      Last update: 2005-03-22 13:35    [W:0.022 / U:30.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site