Re: [RFC] Enabling other oom schemes

Helge Hafting
2003-09-12T11:09:52Z

On Fri, Sep 12, 2003 at 12:31:27AM -0400, Chris Friesen wrote:
> Rahul Karnik wrote:
> >Rusty Lynch wrote:
> >
> >>The patch below uses a notifier list for other components to register
> >>to be called when an out of memory condition occurs.
> >
> >
> >How does this interact with the overcommit handling? Doesn't strict
> >overcommit also not oom, but rather return a memory allocation error?
> >Could we not add another overcommit mode where oom conditions cause a
> >kernel panic?
>
> If you have real, true strict overcommit, then it can cause you to have
> errors much earlier than expected.
>
> Imagine a process that consumes 51% of memory. With strict overcommit,
> that process cannot fork() since there is not enough memory.

Note that this "memory" is RAM+swap. So you can avoid allocation
failure by giving your strict overcommit box much more swap space.

The allocations will be backed by swap, this won't slow the machine
down at all because it isn't used normally. Or to put it another
way - you'll use that extra swap only in those situations where
you otherwise get allocation failure or OOM killing.

Helge Hafting