Message ID | 20141207104539.GK15892@dhcp22.suse.cz (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Sun, Dec 07, 2014 at 11:45:39AM +0100, Michal Hocko wrote: .... > void mark_tsk_oom_victim(struct task_struct *tsk) > { > set_tsk_thread_flag(tsk, TIF_MEMDIE); > + __thaw_task(tsk); Yeah, this is a lot better. Maybe we can add a comment at least pointing readers to where to look at to understand what's going on? This stems from the fact that OOM killer which essentially is a memory reclaim operation overrides freezing. It'd be nice if that is documented somehow. Thanks.
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 56eab9621c3a..19a08f3f00ba 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -266,8 +266,6 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task, * Don't allow any other task to have access to the reserves. */ if (test_tsk_thread_flag(task, TIF_MEMDIE)) { - if (unlikely(frozen(task))) - __thaw_task(task); if (!force_kill) return OOM_SCAN_ABORT; } @@ -428,6 +426,7 @@ void note_oom_kill(void) void mark_tsk_oom_victim(struct task_struct *tsk) { set_tsk_thread_flag(tsk, TIF_MEMDIE); + __thaw_task(tsk); } /**