Re: [PATCH] strict VM overcommit

Hugh Dickins (hugh@veritas.com)
Mon, 22 Jul 2002 13:45:40 +0100 (BST)


On 22 Jul 2002, Alan Cox wrote:
>
> Lets put this bluntly. Your swapdisk is losing sectors left right and
> centre. You propose a system where the kernel says "sorry might cause an
> OOM" and I lose everything as the disk goes down. Letting the admin set
> policy means I can swapoff, maybe lose a program or two to OOM but not
> lose the entire system in the process.
>
> Its quite clear that being able to override the kernels assumptions
> about what is right are sensible. It always has been

Suggested compromise: swapoff (in loose overcommit-permitted mode)
should always swap off as much as it can, a small margin short of
causing OOM, but should then give up with ENOMEM (leaving the whole
swap area available again, for consistency). Seeing its failure,
the admin can then choose processes to kill (overriding the kernel's
assumptions about what is right to kill), and try swapoff again.

At present it never gives up: I do intend to fix that.

In strict no-overcommit mode, it should probably decide in advance
whether to embark on swapping off: I think you suggested that
earlier in the thread, that it's acceptable to switch overcommit
mode temporarily to achieve whichever behaviour is desirable?

Hugh

-
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/