Improve VM and OOM settings for erasing memory
The test suite in
feature/jessie has good reasons to set
oom_kill_allocating_task to 0, and
/proc/sys/vm/overcommit_memory to 0. These reasons probably apply as-is to
Don't kill the allocating task when erasing memory on shutdown.
The kernel's default (0) that we enforce here is to kill the hoggers, which will
be our sdmem instances.
Killing the allocating task may have been sound in the past, but it feels too
risky these days, given early boot (initramfs) sees increasing concurrency.
Make sure the kernel doesn't starve from memory during memory erasure.
We want to set it to the lowest possible value, to maximize the coverage
of memory erasure. But Documentation/sysctl/vm.txt for
vm.min_free_kbytes says: "if you set this to lower than 1024KB, your
system will become subtly broken, and prone to deadlock under high
loads". With 2048KB I've seen freezes, so let's not modify the kernel
default (8192KB on x86_64 currently).