Re: [PATCH] strict VM overcommit

Adrian Bunk (bunk@fs.tum.de)
Fri, 19 Jul 2002 13:02:16 +0200 (CEST)


On 18 Jul 2002, Robert Love wrote:

> > Out of interest:
> >
> > How is assured that it's impossible to OOM when the amount of memory
> > shrinks?
> >
> > IOW:
> > - allocate very much memory
> > - "swapoff -a"
>
> Well, seriously: don't do that.
>
> But `swapoff' will not succeed if there is not enough swap or physical
> memory to move the pages to... if it does succeed, then there is enough
> storage elsewhere. At that point, you are not OOM but you may now have
> more address space allocated than the strict accounting would typically
> allow - thus no allocations will succeed so you should not be able to
> OOM.

"thus no allocations will succeed" seems to be a synonymous for "the
machine is more or less dead"?

And this might be a real problem:

If you have a xsession with many open programs and leave it with an xlock
over night it's quite usual that all your applications are swapped out the
next morning. A convenient way to get all your applications swapped in
again is a "swapoff -a; swapon -a". You might argue that this is "wrong"
but it's as far as I know the best solution to get all your applications
swapped in again (and I know several people doing it this way).

If "no allocations will succeed" the first command that will fail is the
"swapon -a"...

> Robert Love

cu
Adrian

-- 

You only think this is a free country. Like the US the UK spends a lot of time explaining its a free country because its a police state. Alan Cox

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/