From what I understand from its author :
The OOM killer currently allows to kill only a single task in a good hope that the task will terminate in a reasonable time and frees up its memory. (…)
It has been shown (e.g. by Tetsuo Handa) that it is not that hard to construct workloads which break the core assumption mentioned above and the OOM victim might take unbounded amount of time to exit because it might be blocked in the uninterruptible state waiting for on an event (e.g. lock) which is blocked by another task looping in the page allocator.
This patch reduces the probability of such a lockup by introducing a specialized kernel thread (oom_reaper) which tries to reclaim additional memory by preemptively reaping the anonymous or swapped out memory owned by the oom victim under an assumption that such a memory won't be needed when its owner is killed and kicked from the userspace anyway.
In short, the oom_reaper kernel thread aims at lowering the probability of inappropriate decisions from the oom_killer.
From what I understand from RHEL 8 documentation :
The /proc/sys/vm/panic_on_oom file contains a value which is the switch that controls Out of Memory (OOM) behavior. When the file contains 1, the kernel panics on OOM and stops functioning as expected.
The default value is 0, which instructs the kernel to call the oom_killer function when the system is in an OOM state.
In short : having vm.panic_on_oom = 1 an OOM state won't trigger oom_killer launch.
And therefore, logically, no need for its oom_reaper crutch.
However, oom_reaper appears launched (under linux-5.4) at system init irrespective of vm.panic_on_oom value.
Why ? Is there something I missed ? Something that makes the oom_reaper necessary even in case the killer won't ever be launched ? If not, how is it possible to prevent oom_reaper to be launched when vm.panic_on_oom = 1 ?
Note 1 : Of course I understand from the reading of the code that it won't be built if CONFIG_MMU is not set but this is obviously not an option on my system.