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


Groups > linux.kernel > #1447011

Re: [PATCH 10/10] mm, oom: hide mm which is shared with kthread or global init

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 10/10] mm, oom: hide mm which is shared with kthread or global init
Date 2016-07-20 08:30 +0200
Message-ID <rWTb3-6fy-1@gated-at.bofh.it> (permalink)
References <rM6Om-8j0-11@gated-at.bofh.it> <rM6Om-8j0-39@gated-at.bofh.it> <rWC0x-3PW-1@gated-at.bofh.it> <rWMCC-1Wj-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 19-07-16 16:27:59, Andrew Morton wrote:
> On Tue, 19 Jul 2016 14:05:39 +0200 Michal Hocko <mhocko@kernel.org> wrote:
> 
> > > After this patch we should guarantee a forward progress for the OOM
> > > killer even when the selected victim is sharing memory with a kernel
> > > thread or global init.
> > 
> > Could you replace the last two paragraphs with the following. Tetsuo
> > didn't like the guarantee mentioned there because that is a too strong
> > statement as find_lock_task_mm might not find any mm and so we still
> > could end up looping on the oom victim if it gets stuck somewhere in
> > __mmput. This particular patch didn't aim at closing that case. Plugging
> > that hole is planned later after the next upcoming merge window closes.
> > 
> > "
> > In order to help a forward progress for the OOM killer, make sure
> > that this really rare cases will not get into the way and hide
> > the mm from the oom killer by setting MMF_OOM_REAPED flag for it.
> > oom_scan_process_thread will ignore any TIF_MEMDIE task if it has
> > MMF_OOM_REAPED flag set to catch these oom victims.
> > 		        
> > After this patch we should guarantee a forward progress for the OOM
> > killer even when the selected victim is sharing memory with a kernel
> > thread or global init as long as the victims mm is still alive.
> > "
> 
> I tweaked it a bit:
> 
> : In order to help forward progress for the OOM killer, make sure that
> : this really rare case will not get in the way - we do this by hiding
> : the mm from the oom killer by setting MMF_OOM_REAPED flag for it. 
> : oom_scan_process_thread will ignore any TIF_MEMDIE task if it has
> : MMF_OOM_REAPED flag set to catch these oom victims.
> : 
> : After this patch we should guarantee forward progress for the OOM
> : killer even when the selected victim is sharing memory with a kernel
> : thread or global init as long as the victims mm is still alive.

Sounds good to me. Thanks!

-- 
Michal Hocko
SUSE Labs

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


Thread

Re: [PATCH 10/10] mm, oom: hide mm which is shared with kthread or  global init Michal Hocko <mhocko@kernel.org> - 2016-07-19 14:10 +0200
  Re: [PATCH 10/10] mm, oom: hide mm which is shared with kthread or  global init Andrew Morton <akpm@linux-foundation.org> - 2016-07-20 01:30 +0200
    Re: [PATCH 10/10] mm, oom: hide mm which is shared with kthread or  global init Michal Hocko <mhocko@kernel.org> - 2016-07-20 08:30 +0200

csiph-web