Received: by 10.192.165.156 with SMTP id m28csp749301imm; Tue, 17 Apr 2018 19:57:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/zCj2ncr8nw4SIwfcBSHdxRqT7tzd74uGIgZkfTLp82nkA1DrvjNsNKymdvUgtRwOLX33P X-Received: by 2002:a17:902:8543:: with SMTP id d3-v6mr347832plo.20.1524020272086; Tue, 17 Apr 2018 19:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524020272; cv=none; d=google.com; s=arc-20160816; b=NGMIidH7GQFW1+quYH3GQGTZlgjgTj61Yll6IYqwpTaYsMLTLIN/AJkoi+1o0N7Nr4 AU7KimqVB4/rmA18qB4xrnUb/ijspHJWR4HlfLG073H0ERKDaa3KOFrhHKbWarSZF8V6 kDSoMCkqPkQmIAZFkIfTe7msgEQNg0HFLESFu1xozQ94qsgLMZA4kCDnK7HjFQg7uXf7 7DzzDkF4fuTKuRjvklXyTSKlf+4p36V3wa0sCJFcz9bFw9Fnhee9tM/2UYDscp2V17n2 pYtfn+MpPtRb2ruF+iCOBjyhn9Wedxc4/dQcgP5OGr62wD5xRj9DqorB70eUE4MoYFYw wZJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=1i3JOZIwyo69JSlM4DkJn2JZjITiNca4oDBZWua2tuQ=; b=mhXJHL64tJrzB0sv+r1SKwAmiGUXVpV3imd16SlibSpEN0JohXMuBL2gXKkAkVa0u9 J15DXQJyaySAwHHuyRwx3VMX8nCRo7qnsTi6+b3/VSNgpvaUGBWOYp+y5eJ7x8wbG4ki cDerOCCc779IcK5uusHONYODYiaVI719RbRKaQh/ccUtDxZl245SBjJGOrJF3fpirV0w v0F9k0JuEM2i594T4JOsF/vFlq/jT/WOMpDjqCtU+GaPaNGQggKNUqH5X0incj/xvlq4 eFgOZvf4t9l2a8VWfGY4NXgPw2kwaRdtzU7ns6ouoft1SHmCJiDuiEhPMbPYnoz35xcW JuJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Rn7jdWwQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si224026pga.326.2018.04.17.19.57.37; Tue, 17 Apr 2018 19:57:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Rn7jdWwQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753340AbeDRC4e (ORCPT + 99 others); Tue, 17 Apr 2018 22:56:34 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:36258 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752800AbeDRC4c (ORCPT ); Tue, 17 Apr 2018 22:56:32 -0400 Received: by mail-pf0-f177.google.com with SMTP id g14so169135pfh.3 for ; Tue, 17 Apr 2018 19:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=1i3JOZIwyo69JSlM4DkJn2JZjITiNca4oDBZWua2tuQ=; b=Rn7jdWwQw8avVafAsDexbk5g5x3lioQKysK7JIwbeLcEPWvtBe+KGHcTey9xWo3qV8 nsek0fomq7nQhSsP8BrOV916JqXnUa5At+ICWGF3VK1YKKCuH1nYQI5/kfPd5vc+w9rA lId4q60Zk11lAtCiWXAu44aNFatqAONKWtuFK1XvbaM9o0XjG+q6DUm61qLwTvdrSRva IwDfHaw7p8EOUiUyMmzOmP+ODyHdiaS/EuIZE2bbc/lMfYn1FZj+LAzy9PYgVMlkxPHs HGXNMaipvf1pSLK/QRoaYYTBDCr8/xUtPuJTAAUt1aMYDLbdznmMTfw3sEKEtuFGl/Eq ALXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=1i3JOZIwyo69JSlM4DkJn2JZjITiNca4oDBZWua2tuQ=; b=cjuzB4AR97yBm2qukA2xD/H/CR6AH47zbuvIEjBTbaNnn01LiscD5A+oNvU0sExOXC p1w3MPyOlO2uBz9cMuoM0Izw0CI1v4Fwl2QGvMG7NzWDfStDRsOrl2BuzYcGhBX2odwU hvm/xez/VfnP+rKZa4vuZKDCVsY/TPy/3qLtz7jrLq/xcMRTi0ypxct11H0RdYIy3puV CiRtrUgA/myEDRLG8GooO/cYONNPB0E7Cky7IeSprFGpHL0spt7ALlFwOzyS9y3TreG5 xD5cBs3sLNmoCKhXRklKOUYMtIPohGURphwKNrdxTcaLBPRApnK3yHBAdl3lzoIwo84z VihQ== X-Gm-Message-State: ALQs6tCK5UF3E64bj0DmVYc8qqhmX/7q8rTw+qpEs22s6Vw16B+OGnP9 YRbOL98jV6n/v9IGvMTpNlZOuSLvke8= X-Received: by 10.167.131.217 with SMTP id j25mr305929pfn.5.1524020191845; Tue, 17 Apr 2018 19:56:31 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id p1sm317751pgc.15.2018.04.17.19.56.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Apr 2018 19:56:31 -0700 (PDT) Date: Tue, 17 Apr 2018 19:56:30 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Minchan Kim cc: Andrew Morton , LKML , linux-mm , Johannes Weiner , Michal Hocko , Vladimir Davydov Subject: Re: [PATCH] mm:memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create In-Reply-To: <20180418022912.248417-1-minchan@kernel.org> Message-ID: References: <20180418022912.248417-1-minchan@kernel.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Apr 2018, Minchan Kim wrote: > If there are heavy memory pressure, page allocation with __GFP_NOWAIT > fails easily although it's order-0 request. > I got below warning 9 times for normal boot. > > [ 17.072747] c0 0 : page allocation failure: order:0, mode:0x2200000(GFP_NOWAIT|__GFP_NOTRACK) > < snip > > [ 17.072789] c0 0 Call trace: > [ 17.072803] c0 0 [] dump_backtrace+0x0/0x4 > [ 17.072813] c0 0 [] dump_stack+0xa4/0xc0 > [ 17.072822] c0 0 [] warn_alloc+0xd4/0x15c > [ 17.072829] c0 0 [] __alloc_pages_nodemask+0xf88/0x10fc > [ 17.072838] c0 0 [] alloc_slab_page+0x40/0x18c > [ 17.072843] c0 0 [] new_slab+0x2b8/0x2e0 > [ 17.072849] c0 0 [] ___slab_alloc+0x25c/0x464 > [ 17.072858] c0 0 [] __kmalloc+0x394/0x498 > [ 17.072865] c0 0 [] memcg_kmem_get_cache+0x114/0x2b8 > [ 17.072870] c0 0 [] kmem_cache_alloc+0x98/0x3e8 > [ 17.072878] c0 0 [] mmap_region+0x3bc/0x8c0 > [ 17.072884] c0 0 [] do_mmap+0x40c/0x43c > [ 17.072890] c0 0 [] vm_mmap_pgoff+0x15c/0x1e4 > [ 17.072898] c0 0 [] sys_mmap+0xb0/0xc8 > [ 17.072904] c0 0 [] el0_svc_naked+0x24/0x28 > [ 17.072908] c0 0 Mem-Info: > [ 17.072920] c0 0 active_anon:17124 inactive_anon:193 isolated_anon:0 > [ 17.072920] c0 0 active_file:7898 inactive_file:712955 isolated_file:55 > [ 17.072920] c0 0 unevictable:0 dirty:27 writeback:18 unstable:0 > [ 17.072920] c0 0 slab_reclaimable:12250 slab_unreclaimable:23334 > [ 17.072920] c0 0 mapped:19310 shmem:212 pagetables:816 bounce:0 > [ 17.072920] c0 0 free:36561 free_pcp:1205 free_cma:35615 > [ 17.072933] c0 0 Node 0 active_anon:68496kB inactive_anon:772kB active_file:31592kB inactive_file:2851820kB unevictable:0kB isolated(anon):0kB isolated(file):220kB mapped:77240kB dirty:108kB writeback:72kB shmem:848kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no > [ 17.072945] c0 0 DMA free:142188kB min:3056kB low:3820kB high:4584kB active_anon:10052kB inactive_anon:12kB active_file:312kB inactive_file:1412620kB unevictable:0kB writepending:0kB present:1781412kB managed:1604728kB mlocked:0kB slab_reclaimable:3592kB slab_unreclaimable:876kB kernel_stack:400kB pagetables:52kB bounce:0kB free_pcp:1436kB local_pcp:124kB free_cma:142492kB > [ 17.072949] c0 0 lowmem_reserve[]: 0 1842 1842 > [ 17.072966] c0 0 Normal free:4056kB min:4172kB low:5212kB high:6252kB active_anon:58376kB inactive_anon:760kB active_file:31348kB inactive_file:1439040kB unevictable:0kB writepending:180kB present:2000636kB managed:1923688kB mlocked:0kB slab_reclaimable:45408kB slab_unreclaimable:92460kB kernel_stack:9680kB pagetables:3212kB bounce:0kB free_pcp:3392kB local_pcp:688kB free_cma:0kB > [ 17.072971] c0 0 lowmem_reserve[]: 0 0 0 > [ 17.072982] c0 0 DMA: 0*4kB 0*8kB 1*16kB (C) 0*32kB 0*64kB 0*128kB 1*256kB (C) 1*512kB (C) 0*1024kB 1*2048kB (C) 34*4096kB (C) = 142096kB > [ 17.073024] c0 0 Normal: 228*4kB (UMEH) 172*8kB (UMH) 23*16kB (UH) 24*32kB (H) 5*64kB (H) 1*128kB (H) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3872kB > [ 17.073069] c0 0 721350 total pagecache pages > [ 17.073073] c0 0 0 pages in swap cache > [ 17.073078] c0 0 Swap cache stats: add 0, delete 0, find 0/0 > [ 17.073081] c0 0 Free swap = 0kB > [ 17.073085] c0 0 Total swap = 0kB > [ 17.073089] c0 0 945512 pages RAM > [ 17.073093] c0 0 0 pages HighMem/MovableOnly > [ 17.073097] c0 0 63408 pages reserved > [ 17.073100] c0 0 51200 pages cma reserved > > Let's not make user scared. > > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: Vladimir Davydov > Signed-off-by: Minchan Kim Acked-by: David Rientjes