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:Hong-Mei Li <a21834@motorola.com> Reviewed-on: http://gerrit.pcs.mot.com/625310 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by:
Jira Key <jirakey@motorola.com> Reviewed-by:
Yi-Wei Zhao <gbjc64@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com> Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com> Signed-off-by:
tarun93 <tarunmyid@gmail.com>
Loading
Please register or sign in to comment