Received: by 10.192.165.156 with SMTP id m28csp732945imm; Tue, 17 Apr 2018 19:30:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx49cz1nhbXEYDwGDvUwkvpzfLTUCaWW7Ekw6zfAopuJLwcEv62364P4lYbjxnQqldqyVMZMQ X-Received: by 10.101.90.194 with SMTP id d2mr224787pgt.352.1524018645106; Tue, 17 Apr 2018 19:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524018645; cv=none; d=google.com; s=arc-20160816; b=q7UEVbhCHQzEv+qcYOdlM+ZEaZ8ZwZCzET0NI69zpKQxSSSYax27msfKreHvMBRXhu Ffj2LNnsAKLHi+0TGEgr6CPnDKpbGa9SSn1DB8oqQPC/JjYRetjGaZLg/PAu6swXHKrh RVjtrN50x5XhlH5ecW5Ca7dyd3/HZO2pA3Yy1VRl5ATDF081AeJWR5CcscrJjEoLH1t8 sx+URvDdEqfSwlECzu5YXLFAWwzrcIy7+yrXae46mLAEwligv3LM+K9JfQvvk4+roIQC C1wa/SjDLtnhBKX1WBXmJB6KdWoQW1jaJO7OmoDPO89B/oXbcRQXiOwAf1cu0ZTQ3oQb 1zgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=TYQwo2v/CEnHTP41ugkv7f5P60StAvRIrB48TKf+TMo=; b=hEe17IxfhRnfa8hihnq1wxI4enlb4Q6IowF9v+/yy3ufiQXzDAXx0E5iqnrF3CplVu hwqscqBbXKWEvT17NYJY5cg1gkPBl1cVwIq/YuSX2JBo28FfPzOZxVkPjvVlJhXMQVZG SMqdE/3MjiJWgPoJY+hwKrmkX2JsrklR72lCfzjOPykhMsETUrI18cYO7EtS5EfmCrkk p2xYMB0kfB6oTau0aSchBHg+28WBspEHvmq3PET2eM8xcX95kvZKvqw5ZDMcSjLzKz96 AsWYbig8uSz/Nqt94Rhqh2mm/kG5iw81Cjf6Pg7X6zUtxoQxAR51QQK99P4+vxvZFTBI Zb+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tJw9zNaj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si156337pgp.671.2018.04.17.19.30.31; Tue, 17 Apr 2018 19:30:45 -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=fail header.i=@gmail.com header.s=20161025 header.b=tJw9zNaj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753323AbeDRC3Y (ORCPT + 99 others); Tue, 17 Apr 2018 22:29:24 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39467 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbeDRC3U (ORCPT ); Tue, 17 Apr 2018 22:29:20 -0400 Received: by mail-pf0-f194.google.com with SMTP id z9so138056pfe.6 for ; Tue, 17 Apr 2018 19:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=TYQwo2v/CEnHTP41ugkv7f5P60StAvRIrB48TKf+TMo=; b=tJw9zNaj2rv+FUoJ5fBOTBy+UunGjW3FPckd8d6KXInB7XG9uLWeja5P8wcHL2khD5 u50Mv8j4hgJeogw6vAB7H7SAZw0G0GR1PW7ud43s9uJR1WrI6kM7XjlOkMILkvyaL2VA QxInBwJKY6Wl4Lil3/pqEdQTSLIZvHdDgKOYAS9EfDqGNE4vVrz7TCFAOHmLYQop8NiK hNL9/Bt+YYJtj0enI3x0C1KR/jZWk8tQemscI74fGHT5iB6dywPdJ4rSaP5eUWr0kEzB v5qRtaUkB/+9ikURkAAzekCLVxkCeXHbX+jLN5RBBFNlayYWYH971y6V+yE8LGhQFEba s0ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=TYQwo2v/CEnHTP41ugkv7f5P60StAvRIrB48TKf+TMo=; b=fhLN9Cgci6Sjg2B33rMnTQJtiyFfBTE0UHqUlryCwI6QL2vquErx5wGk0QWw90RMUv W5EPE4gaHVclh7ITAXbOE59IoB3qd5gI/XZ559mb6ubCQNljer+eMaC1PFzr+W7F5pvw uiv00I6YJKCDh1CQomZ42KAiH3ic5kwHY6AZMj2PFTzyOYYFL+BJVK+kle5i3Fgh5zwU 5KO+XwQypPlEXqodJN5O3Jp4UL5yCgAaRvjdxG1nWBwgJzPkevx3Aewin8Z8lsG2UcR5 An0W2KJPwOe3eQqv71HYQ+OBzMFAwFdiv1qQQ48njodPAas2KbW87UbKrX93asngXqWj ZubA== X-Gm-Message-State: ALQs6tAzi168DBvB0tYaD9t7KPHhIuB85xFgTL4OT3jdNPwTuEJwsxIA gvhIFl3PAjWV0kG2rXRp8WA= X-Received: by 10.99.125.78 with SMTP id m14mr220836pgn.190.1524018559888; Tue, 17 Apr 2018 19:29:19 -0700 (PDT) Received: from bbox-2.seo.corp.google.com ([2401:fa00:d:10:affa:813f:5380:6613]) by smtp.gmail.com with ESMTPSA id q17sm175083pgt.70.2018.04.17.19.29.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 19:29:18 -0700 (PDT) From: Minchan Kim To: Andrew Morton Cc: LKML , linux-mm , Minchan Kim , Johannes Weiner , Michal Hocko , Vladimir Davydov Subject: [PATCH] mm:memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create Date: Wed, 18 Apr 2018 11:29:12 +0900 Message-Id: <20180418022912.248417-1-minchan@kernel.org> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 448db08d97a0..671d07e73a3b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2200,7 +2200,7 @@ static void __memcg_schedule_kmem_cache_create(struct mem_cgroup *memcg, { struct memcg_kmem_cache_create_work *cw; - cw = kmalloc(sizeof(*cw), GFP_NOWAIT); + cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN); if (!cw) return; -- 2.17.0.484.g0c8726318c-goog