sysrq: Don't panic_on_oom if the user requested an OOM kill.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · David Rientjes
Quoted 10 lines · Geoffrey Thomas
If I specifically request an OOM kill via magic sysrq, I don't want
panic_on_oomto apply and crash the machine. I ran into this on a server withpanic_on_oomand automatic reboot after panic configured on the assumption that nobody is likely physically present. If I'm able to use magic sysrq, though, I can use that to reboot the machine slightly more safely, if that's what I wanted.This patch adds an extra parameter to
out_of_memoryto ignore the value ofsysctl_panic_on_oom, and just proceed with the OOM kill.
Quoted 7 lines
Quoted 1 line
Signed-off-by Geoffrey Thomas <[email protected]>Nack, it's your own fault for asking for
panic_on_oomand then not wanting it to panic on oom.Disable
/proc/sys/vm/panic_on_oombefore invoking the oom killer and then reenable it afterwards.
Did you even think about the reasons for pressing sysrq-foo? Like - e.g. - NOT BEING ABLE TO LOG IN?