lkml.org 
[lkml]   [2015]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] mm/oom_kill.c: don't kill TASK_UNINTERRUPTIBLE tasks
    Date
    Currently, the oom killer will attempt to kill a process that is in
    TASK_UNINTERRUPTIBLE state. For tasks in this state for an exceptional
    period of time, such as processes writing to a frozen filesystem during
    a lengthy backup operation, this can result in a deadlock condition as
    related processes memory access will stall within the page fault
    handler.

    Within oom_unkillable_task(), check for processes in
    TASK_UNINTERRUPTIBLE (TASK_KILLABLE omitted). The oom killer will
    move on to another task.

    Signed-off-by: Kyle Walker <kwalker@redhat.com>
    ---
    mm/oom_kill.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/mm/oom_kill.c b/mm/oom_kill.c
    index 1ecc0bc..66f03f8 100644
    --- a/mm/oom_kill.c
    +++ b/mm/oom_kill.c
    @@ -131,6 +131,10 @@ static bool oom_unkillable_task(struct task_struct *p,
    if (memcg && !task_in_mem_cgroup(p, memcg))
    return true;

    + /* Uninterruptible tasks should not be killed unless in TASK_WAKEKILL */
    + if (p->state == TASK_UNINTERRUPTIBLE)
    + return true;
    +
    /* p may not have freeable memory in nodemask */
    if (!has_intersects_mems_allowed(p, nodemask))
    return true;
    --
    2.4.3


    \
     
     \ /
      Last update: 2015-09-17 20:21    [W:3.956 / U:0.216 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site