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/