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

Skip to content
Commit 3a74e8e4 authored by Hong-Mei Li's avatar Hong-Mei Li Committed by Dyneteve
Browse files

lowmemorykiller: skip dying or exiting task



Under certain circumstances, a process may take time to handle a SIGKILL.
When lowmemkiller is called again shortly after, it would pick the same
process to kill over and over, so that we cann't get free memory for long
time. We would skip the task who has fatal_signal_pending().

Also a task can be selected to kill when it's already exiting. Sending
signal to the task at that state won't set TIF_SIGPENDING for it.
After that, every task including threads in the exiting task itself
running into lmk will compete for the mutex, then spend some time
waiting for the exiting task to release memory or try to send signal
to the same task again. We skip lmk if current thread group leader is
exiting and is killed by lmk. Also delegate TIF_MEMDIE to current task.

Signed-off-by: default avatarHong-Mei Li <a21834@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/625310


SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: default avatarJira Key <jirakey@motorola.com>
Reviewed-by: default avatarYi-Wei Zhao <gbjc64@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
Signed-off-by: default avatartarun93 <tarunmyid@gmail.com>
parent 1be3201c
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