Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30172d57 authored by Sultan Alsawaf's avatar Sultan Alsawaf Committed by KakatkarAkshay
Browse files

mm: Adjust tsk_is_oom_victim() for Simple LMK



The page allocator uses tsk_is_oom_victim() to determine when to
fast-path memory allocations in order to get an allocating process out
of the page allocator and into do_exit() quickly. Unfortunately,
tsk_is_oom_victim()'s check to see if a process is killed for OOM
purposes is to look for the presence of an OOM reaper artifact that only
the OOM killer sets. This means that for processes killed by Simple LMK,
there is no fast-pathing done in the page allocator to get them to die
faster.

Remedy this by changing tsk_is_oom_victim() to look for the existence of
the TIF_MEMDIE flag, which Simple LMK sets for its victims.

Signed-off-by: default avatarSultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: default avatarDanny Lin <danny@kdrag0n.dev>
parent 2deb391c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment