From: Michal Hocko <mhocko@kernel.org> To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: akpm@linux-foundation.org, rientjes@google.com, hannes@cmpxchg.org, guro@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim Date: Thu, 27 Jul 2017 16:18:01 +0200 [thread overview] Message-ID: <20170727141801.GA31031@dhcp22.suse.cz> (raw) In-Reply-To: <201707272301.EII82876.tOOJOFLMHFQSFV@I-love.SAKURA.ne.jp> On Thu 27-07-17 23:01:05, Tetsuo Handa wrote: > Michal Hocko wrote: > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index 544d47e5cbbd..86a48affb938 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -1896,7 +1896,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, > > * 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; > > Did we check http://lkml.kernel.org/r/20160909140508.GO4844@dhcp22.suse.cz ? I will double check. > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > > index c9f3569a76c7..65cc2f9aaa05 100644 > > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@ -483,7 +483,7 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm) > > * [...] > > * out_of_memory > > * select_bad_process > > - * # no TIF_MEMDIE task selects new victim > > + * # no TIF_MEMDIE, selects new victim > > * unmap_page_range # frees some memory > > */ > > mutex_lock(&oom_lock); > > This comment is wrong. No MMF_OOM_SKIP mm selects new victim. This hunk shouldn't make it to the patch. -- Michal Hocko SUSE Labs
WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@kernel.org> To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: akpm@linux-foundation.org, rientjes@google.com, hannes@cmpxchg.org, guro@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim Date: Thu, 27 Jul 2017 16:18:01 +0200 [thread overview] Message-ID: <20170727141801.GA31031@dhcp22.suse.cz> (raw) In-Reply-To: <201707272301.EII82876.tOOJOFLMHFQSFV@I-love.SAKURA.ne.jp> On Thu 27-07-17 23:01:05, Tetsuo Handa wrote: > Michal Hocko wrote: > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index 544d47e5cbbd..86a48affb938 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -1896,7 +1896,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, > > * 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; > > Did we check http://lkml.kernel.org/r/20160909140508.GO4844@dhcp22.suse.cz ? I will double check. > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > > index c9f3569a76c7..65cc2f9aaa05 100644 > > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@ -483,7 +483,7 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm) > > * [...] > > * out_of_memory > > * select_bad_process > > - * # no TIF_MEMDIE task selects new victim > > + * # no TIF_MEMDIE, selects new victim > > * unmap_page_range # frees some memory > > */ > > mutex_lock(&oom_lock); > > This comment is wrong. No MMF_OOM_SKIP mm selects new victim. This hunk shouldn't make it to the patch. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-07-27 14:18 UTC|newest] Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-07-27 9:03 [PATCH 0/2] mm, oom: do not grant oom victims full memory reserves access Michal Hocko 2017-07-27 9:03 ` Michal Hocko 2017-07-27 9:03 ` [PATCH 1/2] mm, oom: do not rely on TIF_MEMDIE for " Michal Hocko 2017-07-27 9:03 ` Michal Hocko 2017-08-01 15:30 ` Tetsuo Handa 2017-08-01 15:30 ` Tetsuo Handa 2017-08-01 16:52 ` Michal Hocko 2017-08-01 16:52 ` Michal Hocko 2017-08-02 6:10 ` Michal Hocko 2017-08-02 6:10 ` Michal Hocko 2017-08-03 1:39 ` Tetsuo Handa 2017-08-03 1:39 ` Tetsuo Handa 2017-08-03 7:06 ` Michal Hocko 2017-08-03 7:06 ` Michal Hocko 2017-08-03 8:03 ` Tetsuo Handa 2017-08-03 8:03 ` Tetsuo Handa 2017-08-03 8:21 ` Michal Hocko 2017-08-03 8:21 ` Michal Hocko 2017-08-02 8:29 ` [PATCH v2 " Michal Hocko 2017-08-02 8:29 ` Michal Hocko 2017-08-03 9:37 ` Mel Gorman 2017-08-03 9:37 ` Mel Gorman 2017-08-03 11:00 ` Michal Hocko 2017-08-03 11:00 ` Michal Hocko 2017-08-03 12:22 ` Mel Gorman 2017-08-03 12:22 ` Mel Gorman 2017-07-27 9:03 ` [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim Michal Hocko 2017-07-27 9:03 ` Michal Hocko 2017-07-27 14:01 ` Tetsuo Handa 2017-07-27 14:01 ` Tetsuo Handa 2017-07-27 14:08 ` Tetsuo Handa 2017-07-27 14:08 ` Tetsuo Handa 2017-07-27 14:18 ` Michal Hocko [this message] 2017-07-27 14:18 ` Michal Hocko 2017-07-27 14:45 ` Michal Hocko 2017-07-27 14:45 ` Michal Hocko 2017-07-27 14:55 ` Roman Gushchin 2017-07-27 14:55 ` Roman Gushchin 2017-07-29 8:33 ` kbuild test robot 2017-07-31 6:46 ` Michal Hocko 2017-07-31 6:46 ` Michal Hocko 2017-08-01 12:16 ` [PATCH 0/2] mm, oom: do not grant oom victims full memory reserves access Michal Hocko 2017-08-01 12:16 ` Michal Hocko 2017-08-01 12:23 ` Roman Gushchin 2017-08-01 12:23 ` Roman Gushchin 2017-08-01 12:29 ` Michal Hocko 2017-08-01 12:29 ` Michal Hocko 2017-08-01 12:42 ` Roman Gushchin 2017-08-01 12:42 ` Roman Gushchin 2017-08-01 12:54 ` Michal Hocko 2017-08-01 12:54 ` Michal Hocko 2017-08-07 14:21 ` Michal Hocko 2017-08-07 14:21 ` Michal Hocko 2017-08-10 7:50 [PATCH v2 " Michal Hocko 2017-08-10 7:50 ` [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim Michal Hocko 2017-08-10 7:50 ` Michal Hocko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170727141801.GA31031@dhcp22.suse.cz \ --to=mhocko@kernel.org \ --cc=akpm@linux-foundation.org \ --cc=guro@fb.com \ --cc=hannes@cmpxchg.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=penguin-kernel@I-love.SAKURA.ne.jp \ --cc=rientjes@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.