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


Groups > linux.kernel > #1321064

Re: [PATCH 0/3] OOM detection rework v4

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] OOM detection rework v4
Date Thu, 28 Jan 2016 22:20:02 +0100
Message-ID <qW28W-R2-17@gated-at.bofh.it> (permalink)
References <qG2wi-7PJ-13@gated-at.bofh.it> <qJdvd-6KI-35@gated-at.bofh.it> <qKEMH-1Ku-27@gated-at.bofh.it> <qL5tw-2Yw-3@gated-at.bofh.it> <qLqxX-8eS-1@gated-at.bofh.it> <qMwBj-1tc-7@gated-at.bofh.it> <qT03F-6h7-15@gated-at.bofh.it> <qVHxw-2GU-15@gated-at.bofh.it>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=aAWkXQB24lWHe1Cy5GnIczOpKC6iM9VHwR7FXafDuuI=; b=XiujE0dgDewQMWBBEOY9lXFNpTVGI2i7gUHzSKk6SiMWr8hKp4tM2zzAItuEJDbA9o QKzt6u3qB330BAQu1RsKpni7oxt4heS6WwgtFHb8RZ7vuQx3dYPHe1RxEglA92tJEHh3 vcAxBh4y1H5HAIJsYBccTA5ZnJAUG0TfwLGPpTKZ/m/tdsXbnhrU2f5RrOoNvwAVpft1 RonR/lq7rY3pKJUm2Otmv+8NRj9gwzjKLgFQa30gYGWlF+7VA/l3HmesxTpyJY5/i26H Ifga3IgzcG19V2ER8wQIhu5NRbyN2xdeOfTf1Xnz8DQFjDGTBoCaMqeqRNP6DbfoO0H/ 5SeA==
X-Gm-Message-State AG10YOQIwU1A6bFDh8AVAJE6HP5dxR9RoE4DJMBCergfC8ehY+ckx1eBPunZVqlFpN2RWg==
X-Received by 10.194.57.100 with SMTP id h4mr6109749wjq.21.1454015963081; Thu, 28 Jan 2016 13:19:23 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 46
Organization linux.* mail to news gateway
X-Original-Cc Joonsoo Kim <iamjoonsoo.kim@lge.com>, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>, Andrew Morton <akpm@linux-foundation.org>, torvalds@linux-foundation.org, hannes@cmpxchg.org, mgorman@suse.de, hillf.zj@alibaba-inc.com, Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org
X-Original-Date Thu, 28 Jan 2016 22:19:21 +0100
X-Original-Message-ID <20160128211921.GC621@dhcp22.suse.cz>
X-Original-References <1450203586-10959-1-git-send-email-mhocko@kernel.org> <201512242141.EAH69761.MOVFQtHSFOJFLO@I-love.SAKURA.ne.jp> <201512282108.EDI82328.OHFLtVJOSQFMFO@I-love.SAKURA.ne.jp> <20151229163249.GD10321@dhcp22.suse.cz> <201512310005.DFJ21839.QOOSVFFHMLJOtF@I-love.SAKURA.ne.jp> <201601030047.HJF60980.HJOSFQOMLVFFtO@I-love.SAKURA.ne.jp> <20160120122422.GD14187@dhcp22.suse.cz> <alpine.DEB.2.10.1601271513310.1248@chino.kir.corp.google.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1321064

Show key headers only | View raw


On Wed 27-01-16 15:18:11, David Rientjes wrote:
> On Wed, 20 Jan 2016, Michal Hocko wrote:
> 
> > > That trigger was introduced by commit 97a16fc82a7c5b0c ("mm, page_alloc: only
> > > enforce watermarks for order-0 allocations"), and "mm, oom: rework oom detection"
> > > patch hits the trigger.
> > [....]
> > > [  154.829582] zone=DMA32 reclaimable=308907 available=312734 no_progress_loops=0 did_some_progress=50
> > > [  154.831562] zone=DMA reclaimable=2 available=1728 no_progress_loops=0 did_some_progress=50
> > > [  154.838499] fork invoked oom-killer: order=2, oom_score_adj=0, gfp_mask=0x27000c0(GFP_KERNEL|GFP_NOTRACK|0x100000)
> > > [  154.841167] fork cpuset=/ mems_allowed=0
> > [...]
> > > [  154.917857] Node 0 DMA32 free:17996kB min:5172kB low:6464kB high:7756kB ....
> > [...]
> > > [  154.931918] Node 0 DMA: 107*4kB (UME) 72*8kB (ME) 47*16kB (UME) 19*32kB (UME) 9*64kB (ME) 1*128kB (M) 3*256kB (M) 2*512kB (E) 2*1024kB (UM) 0*2048kB 0*4096kB = 6908kB
> > > [  154.937453] Node 0 DMA32: 1113*4kB (UME) 1400*8kB (UME) 116*16kB (UM) 15*32kB (UM) 1*64kB (M) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 18052kB
> > 
> > It is really strange that __zone_watermark_ok claimed DMA32 unusable
> > here. With the target of 312734 which should easilly pass the wmark
> > check for the particular order and there are 116*16kB 15*32kB 1*64kB
> > blocks "usable" for our request because GFP_KERNEL can use both
> > Unmovable and Movable blocks. So it makes sense to wait for more order-0
> > allocations to pass the basic (NR_FREE_MEMORY) watermark and continue
> > with this particular allocation request.
> > 
> > The nr_reserved_highatomic might be too high to matter but then you see
> > [1] the reserce being 0. So this doesn't make much sense to me. I will
> > dig into it some more.
> > 
> > [1] http://lkml.kernel.org/r/201601161007.DDG56185.QOHMOFOLtSFJVF@I-love.SAKURA.ne.jp
> 
> There's another issue in the use of zone_reclaimable_pages().  I think 
> should_reclaim_retry() using zone_page_state_snapshot() is approrpriate, 
> as I indicated before, but notice that zone_reclaimable_pages() only uses 
> zone_page_state().  It means that the heuristic is based on some 
> up-to-date members and some stale members.  If we are relying on 
> NR_ISOLATED_* to be accurate, for example, in zone_reclaimable_pages(), 
> then it may take up to 1s for that to actually occur and may quickly 
> exhaust the retry counter in should_reclaim_retry() before that happens.

You are right. I will post a patch to fix that.

Thanks!
-- 
Michal Hocko
SUSE Labs

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


Thread

Re: [PATCH 0/3] OOM detection rework v4 David Rientjes <rientjes@google.com> - 2016-01-28 00:20 +0100
  Re: [PATCH 0/3] OOM detection rework v4 Michal Hocko <mhocko@kernel.org> - 2016-01-28 22:20 +0100

csiph-web