lkml.org 
[lkml]   [2011]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] oom: do not live lock on frozen tasks
    On Mon 26-09-11 17:51:40, Rafael J. Wysocki wrote:
    > On Monday, September 26, 2011, Michal Hocko wrote:
    [...]
    > > From f935ed4558c2fb033ef5c14e02b28e12a615f80e Mon Sep 17 00:00:00 2001
    > > From: Michal Hocko <mhocko@suse.cz>
    > > Date: Fri, 16 Sep 2011 11:23:15 +0200
    > > Subject: [PATCH] oom: do not live lock on frozen tasks
    > >
    > > Konstantin Khlebnikov has reported (https://lkml.org/lkml/2011/8/23/45)
    > > that OOM can end up in a live lock if select_bad_process picks up a frozen
    > > task.
    > > Unfortunately we cannot mark such processes as unkillable to ignore them
    > > because we could panic the system even though there is a chance that
    > > somebody could thaw the process so we can make a forward process (e.g. a
    > > process from another cpuset or with a different nodemask).
    > >
    > > Let's thaw an OOM selected frozen process right after we've sent fatal
    > > signal from oom_kill_task.
    > > Thawing is safe if the frozen task doesn't access any suspended device
    > > (e.g. by ioctl) on the way out to the userspace where we handle the
    > > signal and die. Note, we are not interested in the kernel threads because
    > > they are not oom killable.
    > >
    > > Accessing suspended devices by a userspace processes shouldn't be an
    > > issue because devices are suspended only after userspace is already
    > > frozen and oom is disabled at that time.
    > >
    > > run_guest (drivers/lguest/core.c) calls try_to_freeze with an user
    > > context but it seems it is able to cope with signals because it
    > > explicitly checks for pending signals so we should be safe.
    > >
    > > Other than that userspace accesses the fridge only from the
    > > signal handling routines so we are able to handle SIGKILL without any
    > > negative side effects.
    > >
    > > Signed-off-by: Michal Hocko <mhocko@suse.cz>
    > > Reported-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
    >
    > Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

    Thanks.

    --
    Michal Hocko
    SUSE Labs
    SUSE LINUX s.r.o.
    Lihovarska 1060/12
    190 00 Praha 9
    Czech Republic


    \
     
     \ /
      Last update: 2011-09-26 20:31    [W:2.621 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site