All of lore.kernel.org
 help / color / mirror / Atom feed
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
To: Marko Macek <marko.macek@gmx.net>
Cc: linux-kernel@vger.kernel.org
Subject: memory overcommit (was: [PATCH] Remove OOM killer ...)
Date: Sun, 07 Nov 2004 11:34:02 GMT	[thread overview]
Message-ID: <2004Nov7.123402@mips.complang.tuwien.ac.at> (raw)
In-Reply-To: <418DEA55.2080202@gmx.net>

Marko Macek <marko.macek@gmx.net> writes:
>Andries Brouwer wrote:
>
>> I have always been surprised that so few people investigated
>> doing things right, that is, entirely without OOM killer.

I.e., without overcommitment.  That's not necessarily the right thing
for all processes, because many programs are not written in a way to
do useful things when a memory allocation or other system call fails.
For these programs it's better to let the allocation succeed, let it
use all the unused (but possibly commited) memory and swap space in
the system, and kill the process if the system runs out of memory
later.

In a recent posting <2004Oct9.085407@mips.complang.tuwien.ac.at> in
c.o.l.d.s, I proposed separating the processes in two classes:

- a no-overcommit class for which memory commitment is accounted.  It
may get ENOMEM on allocation, when the system runs out of commitable
memory, and processes in this class are never OOM killed.

- an overcommiting class for which memory commitment is not accounted.
It normally does not get ENOMEM on allocation, but if the system runs
out of memory (virtual memory, not commitable memory), processes from
this class are OOM-killed.  Note that these processes can use memory
that has been commited to, but has not been used by no-overcommit
class processes.

Ideally, all the important applications would be able to handle failed
allocations gracefully, and would be marked as no-overcommit, and thus
would be safe from the OOM killer.

And all the other applications would often continue running long after
they would have crashed or become otherwise useless from ENOMEM on a
pure no-overcommitment system.

>> This is not in a state such that I would like to submit it,
>> but I think it would be good to focus some energy into
>> offering a Linux that is guaranteed free of OOM surprises.
>
>A good thing would be to make the OOM killer only kill
>processes that actually overcommit (independant of overcommit mode).

What does that mean?  Overcommitment is normally a thing that all
processes do together (each one usually asks for less than the total
virtual memory).  In my proposal it means that the process would be
marked as overcommiting or not through something like "nice", maybe
with a default coming from a flag in the executable.

- anton
-- 
M. Anton Ertl                    Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html

  reply	other threads:[~2004-11-07 12:03 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 20:01 [PATCH] Remove OOM killer from try_to_free_pages / all_unreclaimable braindamage Marcelo Tosatti
2004-11-05 20:01 ` Marcelo Tosatti
2004-11-05 23:32 ` Jesse Barnes
2004-11-05 23:47   ` Thomas Gleixner
2004-11-05 23:47     ` Thomas Gleixner
2004-11-06  1:20   ` Andrea Arcangeli
2004-11-06  1:20     ` Andrea Arcangeli
2004-11-06  1:26     ` Nick Piggin
2004-11-06  1:26       ` Nick Piggin
2004-11-06  1:36       ` Jesse Barnes
2004-11-06  1:36         ` Jesse Barnes
2004-11-06  1:50       ` Andrea Arcangeli
2004-11-06  1:50         ` Andrea Arcangeli
2004-11-06  9:47         ` Hugh Dickins
2004-11-06  9:47           ` Hugh Dickins
2004-11-06 10:53           ` Nick Piggin
2004-11-06 10:53             ` Nick Piggin
2004-11-06 15:29             ` Andrea Arcangeli
2004-11-06 15:29               ` Andrea Arcangeli
2004-11-06 15:29           ` Andrea Arcangeli
2004-11-06 15:29             ` Andrea Arcangeli
2004-11-06 16:21             ` Hugh Dickins
2004-11-06 16:21               ` Hugh Dickins
2004-12-10  6:02               ` William Lee Irwin III
2004-12-10  6:02                 ` William Lee Irwin III
2004-11-06 11:37         ` Nikita Danilov
2004-11-06 11:37           ` Nikita Danilov
2004-11-06 15:32           ` Andrea Arcangeli
2004-11-06 15:32             ` Andrea Arcangeli
2004-11-06 16:54             ` Nikita Danilov
2004-11-06 16:54               ` Nikita Danilov
2004-11-06 17:44               ` Andrea Arcangeli
2004-11-06 17:44                 ` Andrea Arcangeli
2004-11-06 19:24                 ` Nikita Danilov
2004-11-06 19:24                   ` Nikita Danilov
2004-11-07  1:16                   ` Andrea Arcangeli
2004-11-07  1:16                     ` Andrea Arcangeli
2004-11-06 10:11       ` Marcelo Tosatti
2004-11-06 10:11         ` Marcelo Tosatti
2004-11-06  1:55     ` Thomas Gleixner
2004-11-06  1:55       ` Thomas Gleixner
2004-11-06 10:28       ` Marcelo Tosatti
2004-11-06 10:28         ` Marcelo Tosatti
2004-11-17 22:54       ` Werner Almesberger
2004-11-17 22:54         ` Werner Almesberger
2004-11-17 23:27         ` Chris Ross
2004-11-17 23:27           ` Chris Ross
2004-11-18  0:04           ` Werner Almesberger
2004-11-18  0:04             ` Werner Almesberger
2004-11-18  0:28             ` Chris Ross
2004-11-18  0:28               ` Chris Ross
2004-11-18  1:14               ` Werner Almesberger
2004-11-18  1:14                 ` Werner Almesberger
2004-11-18  8:20                 ` Chris Ross
2004-11-18  8:20                   ` Chris Ross
2004-11-18 10:01                   ` Werner Almesberger
2004-11-18 10:01                     ` Werner Almesberger
2004-11-18 14:44                     ` Thomas Gleixner
2004-11-18 14:44                       ` Thomas Gleixner
2004-11-18 15:10                       ` Chris Friesen
2004-11-18 15:10                         ` Chris Friesen
2004-11-06 10:05     ` Marcelo Tosatti
2004-11-06 10:05       ` Marcelo Tosatti
2004-11-06 15:44       ` Andrea Arcangeli
2004-11-06 15:44         ` Andrea Arcangeli
2004-11-06 15:52         ` Arjan van de Ven
2004-11-06 15:52           ` Arjan van de Ven
2004-11-06 17:09         ` Marcelo Tosatti
2004-11-06 17:09           ` Marcelo Tosatti
2004-11-07  0:48           ` Andrea Arcangeli
2004-11-07  0:48             ` Andrea Arcangeli
2004-11-07 11:21             ` Marcelo Tosatti
2004-11-07 11:21               ` Marcelo Tosatti
2004-11-06 12:53 ` [PATCH] Remove OOM killer Andries Brouwer
2004-11-06 12:53   ` Andries Brouwer
2004-11-06 10:41   ` Marcelo Tosatti
2004-11-06 10:41     ` Marcelo Tosatti
2004-11-07  9:26   ` Marko Macek
2004-11-07  9:26     ` Marko Macek
2004-11-07 11:34     ` Anton Ertl [this message]
2004-11-08 16:27 ` [PATCH] Remove OOM killer from try_to_free_pages / all_unreclaimable braindamage Marcelo Tosatti
2004-11-08 16:27   ` Marcelo Tosatti
2004-11-08 18:55   ` Marcelo Tosatti
2004-11-09  2:22     ` Nick Piggin
2004-11-09  2:35       ` Andrew Morton
2004-11-09  2:46         ` Nick Piggin
2004-11-09  7:18           ` Marcelo Tosatti
2004-11-09  7:15         ` Marcelo Tosatti
2004-11-10  1:11           ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2004Nov7.123402@mips.complang.tuwien.ac.at \
    --to=anton@mips.complang.tuwien.ac.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marko.macek@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.