Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338269

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

From Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Newsgroups linux.kernel
Subject Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable.
Date 2016-02-19 16:10 +0100
Message-ID <r3UQV-6RV-7@gated-at.bofh.it> (permalink)
References <r3iVj-4wq-3@gated-at.bofh.it> <r3rOV-2FS-1@gated-at.bofh.it> <r3ua6-49t-21@gated-at.bofh.it> <r3vzd-5gf-47@gated-at.bofh.it> <r3vIS-5kC-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Michal Hocko wrote:
> On Thu 18-02-16 13:08:49, Michal Hocko wrote:
> > I guess we can safely remove the memcg
> > argument from oom_badness and oom_unkillable_task. At least from a quick
> > glance...
> 
> No we cannot actually. oom_kill_process could select a child which is in
> a different memcg in that case...

Then, don't we need to check whether processes sharing victim->mm in other
thread groups are in the same memcg when we walk the process list?

----------
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index f426ce8..d05db31 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -762,8 +762,7 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
 			continue;
 		if (same_thread_group(p, victim))
 			continue;
-		if (unlikely(p->flags & PF_KTHREAD) || is_global_init(p) ||
-		    p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
+		if (oom_badness(p, memcg, oc, totalpages, false) == 0) {
 			/*
 			 * We cannot use oom_reaper for the mm shared by this
 			 * process because it wouldn't get killed and so the
----------

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 15:40 +0100
  Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are  OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-17 15:50 +0100
  Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they  are OOM-unkillable. David Rientjes <rientjes@google.com> - 2016-02-17 23:40 +0100
    Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are  OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-18 09:10 +0100
      Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-18 11:40 +0100
        Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are  OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-18 13:10 +0100
          Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are  OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-18 13:20 +0100
            Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-19 16:10 +0100
              Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are  OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-19 16:20 +0100

csiph-web