Re: [PATCH v2] mm, oom: OOM sysrq should always kill a process

From: Jann Horn
Date: Thu Jan 06 2022 - 05:22:49 EST


On Thu, Jan 6, 2022 at 11:21 AM Jann Horn <jannh@xxxxxxxxxx> wrote:
> The OOM kill sysrq (alt+sysrq+F) should allow the user to kill the
> process with the highest OOM badness with a single execution.
>
> However, at the moment, the OOM kill can bail out if an OOM notifier
> (e.g. the i915 one) says that it reclaimed a tiny amount of memory
> from somewhere. That's probably not what the user wants.
>
> As documented in struct oom_control, order == -1 means the oom kill is
> required by sysrq. So check for that, and if it's true, don't bail out
> no matter what the OOM notifiers say.

Er, sorry, I just noticed after sending this that the commit message
doesn't make sense anymore... I'll send a new version in a sec.