Skip to content
  • David Rientjes's avatar
    oom: add sysctl to enable task memory dump · fef1bdd6
    David Rientjes authored
    
    
    Adds a new sysctl, 'oom_dump_tasks', that enables the kernel to produce a
    dump of all system tasks (excluding kernel threads) when performing an
    OOM-killing.  Information includes pid, uid, tgid, vm size, rss, cpu,
    oom_adj score, and name.
    
    This is helpful for determining why there was an OOM condition and which
    rogue task caused it.
    
    It is configurable so that large systems, such as those with several
    thousand tasks, do not incur a performance penalty associated with dumping
    data they may not desire.
    
    If an OOM was triggered as a result of a memory controller, the tasklist
    shall be filtered to exclude tasks that are not a member of the same
    cgroup.
    
    Cc: Andrea Arcangeli <andrea@suse.de>
    Cc: Christoph Lameter <clameter@sgi.com>
    Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
    Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    fef1bdd6