mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm: replace TIF_MEMDIE checks by tsk_is_oom_victim
TIF_MEMDIE is set only to the tasks whick were either directly selected by the OOM killer or passed through mark_oom_victim from the allocator path. tsk_is_oom_victim is more generic and allows to identify all tasks (threads) which share the mm with the oom victim. Please note that the freezer still needs to check TIF_MEMDIE because we cannot thaw tasks which do not participage in oom_victims counting otherwise a !TIF_MEMDIE task could interfere after oom_disbale returns. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Michal Hocko <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: David Rientjes <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Roman Gushchin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
cd04ae1e2d
commit
da99ecf117
2 changed files with 6 additions and 5 deletions
|
|
@ -1917,7 +1917,7 @@ retry:
|
|||
* bypass the last charges so that they can exit quickly and
|
||||
* free their memory.
|
||||
*/
|
||||
if (unlikely(test_thread_flag(TIF_MEMDIE) ||
|
||||
if (unlikely(tsk_is_oom_victim(current) ||
|
||||
fatal_signal_pending(current) ||
|
||||
current->flags & PF_EXITING))
|
||||
goto force;
|
||||
|
|
|
|||
Loading…
Reference in a new issue