Received: by 10.192.165.156 with SMTP id m28csp938675imm; Wed, 18 Apr 2018 00:43:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9erBKaSLGSO82TjZjFxtF6zoGitatTnw6kiwEmzPk5ISFE6ENnkPJ8TEXawQWv6hNRVyA X-Received: by 2002:a17:902:6bc3:: with SMTP id m3-v6mr1040695plt.363.1524037436596; Wed, 18 Apr 2018 00:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524037436; cv=none; d=google.com; s=arc-20160816; b=QosMy0l37toORW9sTStpL2EZ7E2FaUFtTrE2R9ZAlFLSRfzMD2hTH635nKP/AwpiBF b/JbNLR8F74tRuSqo2NMEsnb0zru0HQyM6Xk9LcUJI3TYfnnWHl6/RT9LLxIvB3d2cYR ikySz3fOY/N4XbHweBmOo7d70P97OS+RTb/YX9/JteNq3kfH2OJtwD1Dw6fwPv2JdeOD QPhHEvM8483mK/KSF7Z2rxkHO9xpMHKF8hCC2B3XIE8DYxsZy5qabfEW8NXfqU8sQAhJ vIJwPKTIi+K9dHN1g+8SFQp5HnH8CvQfEwHTFFoiSFgMZ7U/FabJZ3y+V20yBIVBnOUn W5Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=T5gFJyoj/kHo8Gwx6fcgNq9aZ4YGHZz8gKPlDQpmRI4=; b=0NlSP+biPH2LrcYP5qVfYNJON/bsDe4mYE5tnQZP6YWZdpnyKG85K+Xhgub33mtHHG yFu/Db/H3cyVoL3a+Nn2K4v9BIKD7PK6KYHAVI33wi/xjZILokXQI5DdVXjJzjzkS9/b A9v9i4Daf8Nxyts/r3o/TZxyOfKz79KQUHR3pZURS0op70g0R2wYVJCZkjwY2WPGoR8Z 0sRG9VtEJyaSKUjU80Fipp0vCU+SNcb2if/fkobzResAn6Ku3AjTH0AR8bww4JBuaBa2 4VQV3xOenh7NTJJz9Dtd7gIZvJj+UHkgmbMYCUoqLe0nB83LJUXFHhDJ5a6kSLfyEp1X Wa4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=n2Rj30Gl; 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 e13si575977pgr.117.2018.04.18.00.43.42; Wed, 18 Apr 2018 00:43:56 -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=n2Rj30Gl; 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 S1752900AbeDRHl0 (ORCPT + 99 others); Wed, 18 Apr 2018 03:41:26 -0400 Received: from mail-pg0-f46.google.com ([74.125.83.46]:43391 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbeDRHlX (ORCPT ); Wed, 18 Apr 2018 03:41:23 -0400 Received: by mail-pg0-f46.google.com with SMTP id f132so454254pgc.10 for ; Wed, 18 Apr 2018 00:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T5gFJyoj/kHo8Gwx6fcgNq9aZ4YGHZz8gKPlDQpmRI4=; b=n2Rj30GlAEZx56p4WGByeArQswEVIuRO8QB20W0OMO72pHnE8MDrjBKUJrXmUt08D0 nI+jqTVUNEkNGQxbmlr8ODIsut73K08j6xImHlk1MfzW4LrAxO6bpssMmg0qW+gahq2e 7ETVLuCh676VlbIkZ9CBdoDVU8TfUZvRVtonMNq/KeYDKzGI6tvv2t8jWtbKoGf61gZl Q4IAMgi3gSmNRCoEQd3fE9F1Lft7+DVKUp1bEjFzPH8jIGXyfoZvYuFvpuH4eKhJeVnp 88DpnYv6pZsBm0rZq1EMcC1ChhXY8xjpNV5+L0wxAoLmHQLJ8G9TzA2tgRn4zCcELFyc LaLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=T5gFJyoj/kHo8Gwx6fcgNq9aZ4YGHZz8gKPlDQpmRI4=; b=gkkCwDqQV44MNWhzE4QWM26Z2koTgUvA4eNRh4/cTbhIZUvo0VWBqWcQYmKcQLbL0/ INLzgVm/k95mLeobZz8JEvw6NKdJjfrFehaFXDua6Mt2rq6crv3C/k/pLJRUJTVNQoMp ZF8qVyca2Nn5iLnjBBA6WjpNqFq9TYqv/n88WQcfxBPxonh3i8UFzyMK3RSZdzf5qZhd 5CZrHK+e8iqt1wo9OIHtI2iuly3PLt3D98iH5pe9uD5qFPLWf9kvk1jONJL8AKlJCFUU pYSoRlBgVegSenmprL3mLb1xNf4eYmzaUIp6oeEpRtuqfDKl/XRrnN6cVyDCJqt2BLjE UxeQ== X-Gm-Message-State: ALQs6tCl+xsKJ4dEwBDb0Xg13tfxzB9GqH2xUbvzd9xp3SfqXz+8j66B LEuQwFjpvsugCWtdUweIol8= X-Received: by 10.98.228.13 with SMTP id r13mr1006003pfh.51.1524037282490; Wed, 18 Apr 2018 00:41:22 -0700 (PDT) Received: from rodete-desktop-imager.corp.google.com ([2401:fa00:d:10:affa:813f:5380:6613]) by smtp.gmail.com with ESMTPSA id a4sm1675241pfj.107.2018.04.18.00.41.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Apr 2018 00:41:21 -0700 (PDT) Date: Wed, 18 Apr 2018 16:41:17 +0900 From: Minchan Kim To: Michal Hocko Cc: Andrew Morton , LKML , linux-mm , Johannes Weiner , Vladimir Davydov Subject: Re: [PATCH] mm:memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create Message-ID: <20180418074117.GA210164@rodete-desktop-imager.corp.google.com> References: <20180418022912.248417-1-minchan@kernel.org> <20180418072002.GN17484@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418072002.GN17484@dhcp22.suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 09:20:02AM +0200, Michal Hocko wrote: > On Wed 18-04-18 11:29:12, 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. > > This is not a proper explanation. So what exactly happens when this > allocation fails? I would suggest something like the following > " > __memcg_schedule_kmem_cache_create tries to create a shadow slab cache > and the worker allocation failure is not really critical because we will > retry on the next kmem charge. We might miss some charges but that > shouldn't be critical. The excessive allocation failure report is not > very much helpful. Replace it with a rate limited single line output so > that we know that there is a lot of these failures and that we need to > do something about it in future. > " > > With the last part to be implemented of course. If you want to see warning and catch on it in future, I don't see any reason to change it. Because I didn't see any excessive warning output that it could make system slow unless we did ratelimiting. It was a just report from non-MM guys who have a concern that somethings might go wrong on the system. I just wanted them relax since it's not critical.