[lkml]   [2009]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: Misleading OOM messages
    On Thu, 2009-05-14 at 13:49 -0700, David Rientjes wrote:
    > I think switching all the oom killer messages to be "no available memory"
    > as it is in the MPOL_BIND case would be the best alternative. We
    > currently use "out of memory" even for cpusets, for example, when it
    > happens because it cannot accommodate any more hardwall allocations while
    > there may be an abundance of memory elsewhere that it cannot access. I
    > also think "no available memory" makes more sense than "out of memory"
    > when describing situations where we're at or below the minimum watermarks
    > for all allowable zones. Either that or "no allowable memory".

    How about something like this to start? We can "mv mm/oom_kill.c
    mm/nam_kill.c" later. ;)

    diff --git a/mm/oom_kill.c b/mm/oom_kill.c
    index 92bcf1d..0ce0d59 100644
    --- a/mm/oom_kill.c
    +++ b/mm/oom_kill.c
    @@ -409,7 +409,8 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
    return 0;

    - printk(KERN_ERR "%s: kill process %d (%s) score %li or a child\n",
    + printk(KERN_ERR "No available memory %s: "
    + "kill process %d (%s) score %li or a child\n",
    message, task_pid_nr(p), p->comm, points);

    /* Try to kill a child first */
    @@ -438,7 +439,7 @@ retry:
    p = current;

    if (oom_kill_process(p, gfp_mask, 0, points, mem,
    - "Memory cgroup out of memory"))
    + "(memory cgroup)"))
    goto retry;
    @@ -519,7 +520,7 @@ static void __out_of_memory(gfp_t gfp_mask, int order)

    if (sysctl_oom_kill_allocating_task)
    if (!oom_kill_process(current, gfp_mask, order, 0, NULL,
    - "Out of memory (oom_kill_allocating_task)"))
    + "(oom_kill_allocating_task)"))
    @@ -537,8 +538,7 @@ retry:
    panic("Out of memory and no killable processes...\n");

    - if (oom_kill_process(p, gfp_mask, order, points, NULL,
    - "Out of memory"))
    + if (oom_kill_process(p, gfp_mask, order, points, NULL, ""))
    goto retry;

    @@ -612,7 +612,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
    switch (constraint) {
    oom_kill_process(current, gfp_mask, order, 0, NULL,
    - "No available memory (MPOL_BIND)");
    + "(MPOL_BIND)");


    -- Dave

     \ /
      Last update: 2009-05-14 23:07    [W:0.025 / U:4.592 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site