Re: [PATCH 4/6] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable.

From: Michal Hocko
Date: Wed Feb 17 2016 - 08:44:48 EST


On Wed 17-02-16 22:36:47, Tetsuo Handa wrote:
[...]
> Are you suggesting something like below?
> (OOM_SCORE_ADJ_MIN check needs to be done after TIF_MEMDIE check)
>
> enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
> struct task_struct *task, unsigned long totalpages)
> {
> if (oom_unkillable_task(task, NULL, oc->nodemask))
> return OOM_SCAN_CONTINUE;
>
> /*
> * This task already has access to memory reserves and is being killed.
> * Don't allow any other task to have access to the reserves.
> */
> if (test_tsk_thread_flag(task, TIF_MEMDIE)) {
> if (!is_sysrq_oom(oc))
> return OOM_SCAN_ABORT;
> }
> if (!task->mm || task->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
> return OOM_SCAN_CONTINUE;

yes

--
Michal Hocko
SUSE Labs