Bug 583999 - [RFE] Add upstream OOM Killer enhancements (eg. /proc/sys/vm/oom_kill_allocating_task)
Summary: [RFE] Add upstream OOM Killer enhancements (eg. /proc/sys/vm/oom_kill_allocat...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.7
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: mm-maint-bot
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-20 13:25 UTC by Matthias Kranz
Modified: 2023-08-08 03:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-03 12:28:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matthias Kranz 2010-04-20 13:25:40 UTC
Description of problem:

Under some circumstances the current RHEL5 implementation of the OOM
killer does not work out very well, e.g. because it needs to scan the
whole task list before it can make its decision to kill a process, based
on the defined heuristics.

In upstream kernel 2.6.24, some additional functionality was
implemented, including

/proc/sys/vm/oom_kill_allocating_task

See also http://lwn.net/Articles/254559/

This enables or disables killing the OOM-triggering task in
out-of-memory situations.

If this is set to zero, the OOM killer will scan through the entire
tasklist and select a task based on heuristics to kill.  This normally
selects a rogue memory-hogging task that frees up a large amount of
memory when killed.

If this is set to non-zero, the OOM killer simply kills the task that
triggered the out-of-memory condition.  This avoids the expensive
tasklist scan.

If panic_on_oom is selected, it takes precedence over whatever value
is used in oom_kill_allocating_task.

The default value is 0.

The following test program might be helpful:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define N       100000

int main (void) {
        int i, n = 0;
        char *pp[N];

        for (n = 0; n < N; n++) {
                pp[n] = malloc(1<<20);
                if (pp[n] == NULL)
                        break;
        }

        printf("malloc failure after %d MiB\n", n);

        for (i = 0; i < n; i++) {
                memset (pp[i], 0, (1<<20));
                printf("got %d MiB\n", i+1);
        }

        return 0;
}

Comment 1 RHEL Program Management 2014-03-07 12:50:54 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 2 RHEL Program Management 2014-06-03 12:28:34 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).


Note You need to log in before you can comment on or make changes to this bug.