Received: by 10.192.165.156 with SMTP id m28csp1229623imm; Wed, 18 Apr 2018 06:25:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx498okeU3/0uZmqetTbav/2SggVA/ppaxGfxStMGsgODD/k8BqDZHsoQoNvJskme0JoIrWuQ X-Received: by 2002:a17:902:227:: with SMTP id 36-v6mr2124308plc.134.1524057915693; Wed, 18 Apr 2018 06:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524057915; cv=none; d=google.com; s=arc-20160816; b=SWCKhGaY0TlAB2/FBg4Us6R6yBY+eHZ/OPT7unJHMYbehQCy4E9wXVkq2FafzlOCsr oTlMwldO9s8jtC8UUX+AePpmizBMfiSIGmTixbI2xAv9iTCb/GQH6XoKVz71bZh0Ycf+ E4WiveAVPiEmxQlRC+OwtDAA2to9Lb1ra0SegIobtDySBU0br1tQnzHRXlMddanaSnGi hZlK+kaleE5+DqL7QUTufDF+XZRVsVLYJPK0Nhv94+TmzO/3N6Q8zZsiUK0brF4o+Yt2 odCGkaAzpMNZS4w9EpfxETOiPOCEPNomiJYFJeySgwgeEYjdqTnMyoezjE5CgcsCwWBD fXjQ== 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=4ndAOzMunq4Dvllswnm95Fb8ow0s+kL+MM4i5CR876U=; b=ISIBY5AvzdTMqNNgd0ns/t00JAKADtfObtkSEUq28NgLLLEIFEQmpve9X7UeMXd4ar xQelGDueCZIZleIVaPARvYqZIZSVPRoMj0KykyiQPVJsGQzSed9rtSExn7Qi5qONOU0w lrHa9J1xYIhIRteJH0BD0pqHL4OVrj7oRYXx/I1LZnI1zStxMsBdZMhR2GSybgO8BySd Q2MWTvt2sM67miXImYCb55h+4Lrmx7wRZ/0GV3igFohWBhkwEuc7xSo/Q6ITUjKKvW+G Mgv4tFUKCELc/r8QAu6oX9esJofDwHvwJN6bXk1+jP585AQHtdVrrnQqlGpgq91lj6rd +mlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=l9znwvkm; 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 k18si1072883pgt.174.2018.04.18.06.24.48; Wed, 18 Apr 2018 06:25:15 -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=l9znwvkm; 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 S1753864AbeDRNXg (ORCPT + 99 others); Wed, 18 Apr 2018 09:23:36 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36673 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752747AbeDRNXe (ORCPT ); Wed, 18 Apr 2018 09:23:34 -0400 Received: by mail-pf0-f195.google.com with SMTP id g14so914143pfh.3 for ; Wed, 18 Apr 2018 06:23:34 -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=4ndAOzMunq4Dvllswnm95Fb8ow0s+kL+MM4i5CR876U=; b=l9znwvkmHLzO2PL86JIfu+HDRX6Sj75cOypGCq9uQviDp82MLzmHrlpsCVHAR+38W/ vw6MMewCPavGTQnRn0nTmhphqWZ0uvhcolx2xLr3aIXeA0FWf2PjMjcUx5duD7e6W/br Bf/dQyuxWMMkDMM8GEDxCs3jJUrVQ7senvjXIvobEKTWdROxIP698XIVOeJ/kbYLJZW/ CBngFn+ATDRfS+Sr2LVOIjBa2CPPTgK1XUkfekjh6rIpA30x+XrRHg09v3oPuOP2lQcH gFRJrfG/jMRBrGqS0TzUZDHNNPPOiHBS92iHGdj6szr5fJZnTcUS1YnsEdBAUqGXkLQg e6nQ== 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=4ndAOzMunq4Dvllswnm95Fb8ow0s+kL+MM4i5CR876U=; b=YmdJ1ndfkbm1ceOrqHs3r3/iQ6iZggDQhGl1OJmgbzCcuCvIgmj+6bYFTjb2K0XBxS 9ZKhzEmCoUitQV7Uursvnbp96H0sX86BZyZzbkVU/yNU7c7PZQ8F1+KDv2qzR7XNmcuF zB/F9Rv/mvygl+JPp5gJjlDAy6v8DSyw2Nqt++iUNEIb6A+hQhlKNO+pt2BE7Qnz53kn HWgQsA5cGdlG6VxyVTocJ0UQYBDelwy5kSuNTj8FiMXGerFR/xPjeT5oInfw1CjSmF6D r08ToiPpXYYajsRuzzagYn+jqSAMoj/LQSRb5GWgBF6NFO25wSfhce4Z1ehSjaTBhIVz QeWA== X-Gm-Message-State: ALQs6tCuwoMu56xAZFuRMnGDBcEa99gDDgLtijGpRlUrnqZK9l5RXcJ9 U/C9sS/26euY//FilwQXZhA= X-Received: by 10.98.156.152 with SMTP id u24mr2027076pfk.74.1524057813813; Wed, 18 Apr 2018 06:23:33 -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 j11sm2928808pgc.91.2018.04.18.06.23.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Apr 2018 06:23:32 -0700 (PDT) Date: Wed, 18 Apr 2018 22:23:28 +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: <20180418132328.GB210164@rodete-desktop-imager.corp.google.com> References: <20180418022912.248417-1-minchan@kernel.org> <20180418072002.GN17484@dhcp22.suse.cz> <20180418074117.GA210164@rodete-desktop-imager.corp.google.com> <20180418075437.GP17484@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418075437.GP17484@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:54:37AM +0200, Michal Hocko wrote: > On Wed 18-04-18 16:41:17, Minchan Kim wrote: > > On Wed, Apr 18, 2018 at 09:20:02AM +0200, Michal Hocko wrote: > > > On Wed 18-04-18 11:29:12, Minchan Kim wrote: > [...] > > > > 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. > > Yeah, but a single line would be as much informative and less scary to > users. > > > 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. > > I do agree with __GFP_NOWARN but I think a single line warning is due > and helpful for further debugging. Okay, no problem. However, I don't feel we need ratelimit at this moment. We can do when we got real report. Let's add just one line warning. However, I have no talent to write a poem to express with one line. Could you help me? diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 671d07e73a3b..e26f85cac63f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2201,8 +2201,11 @@ static void __memcg_schedule_kmem_cache_create(struct mem_cgroup *memcg, struct memcg_kmem_cache_create_work *cw; cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN); - if (!cw) + if (!cw) { + pr_warn("Fail to create shadow slab cache for memcg but it's not critical.\n"); + pr_warn("If you see lots of this message, send an email to linux-mm@kvack.org\n"); return; + } css_get(&memcg->css);