Received: by 10.192.165.156 with SMTP id m28csp354022imm; Wed, 18 Apr 2018 23:41:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+DcqbHXpwQC6HGbhFd/2aaMRF5Md8DbSgDDF5UZ6tryQff2kKGDDwcpOYH1mknxYh72BE4 X-Received: by 2002:a17:902:24c:: with SMTP id 70-v6mr4998430plc.384.1524120113775; Wed, 18 Apr 2018 23:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524120113; cv=none; d=google.com; s=arc-20160816; b=H1gQ/YAjmHcfdOn5Zt0X4orjj3dbz/eNOXeqxXqGyx8q2yGiN0f4303DX4FKaF4eqQ FAgghmkNCjfHph9hqgAUG6cAworFFsFx9oZIOumioyLV3Xu7+6WlrelEBjla80uEkYDT garRuTFvdyDAD9URsRKDvn0SsJJ1lh3nL9Z71zA67XQOPTKyTxYDlz1guIh847Ws+9cb pkbttLcAoyQq8X3tkd1UgyM2zKDnqBMBEMPijEndEXtvHjw4DUo1JOn584aGTY6l8zMo Ik3Q73uK+GpktEo0UW1UFU612zk1MzYqhUnafTsdCcKenwdnFrNDlTLnQ/wzccsRJD4S /6LA== 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:arc-authentication-results; bh=QO/DIS/SOvKm2LiCBIc4ru9aKr470HOs7Ti4du/NHK0=; b=SwEeFcuAiBW51tfL/JR0eJEXl6vPFc2NeYSq7yABkT1HI/kWu066AOTwk1yW21Enh4 oS+HdITusZ3FJpnC4rJIbjVIN8ayv+iphGT/aNOkQe+QfzpjB+9LVvLXpDefcio2Z5Lg SKqgDY8ardd3bOoUxuPjDHB5pV30ri5UZZrQS34A07yeILSEDDsjI3087xv7XV/dNR4U oQV490MytciTSa0dHNfiTRHzONi7cmqo3siDoSfpdLpy0454UdDfFcKr97aS9LYc4whC HmV3MIDx1jEnyVuxQR5vC7X9pu3KLoYD3r6fY9rURn8Og6fObix6kM/adek1EPWM95WD qKNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 z11si2458608pgz.412.2018.04.18.23.41.40; Wed, 18 Apr 2018 23:41:53 -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; 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 S1752252AbeDSGk2 (ORCPT + 99 others); Thu, 19 Apr 2018 02:40:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:42338 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbeDSGk1 (ORCPT ); Thu, 19 Apr 2018 02:40:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id F1D66AEFC; Thu, 19 Apr 2018 06:40:25 +0000 (UTC) Date: Thu, 19 Apr 2018 08:40:05 +0200 From: Michal Hocko To: David Rientjes Cc: Minchan Kim , 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: <20180419064005.GL17484@dhcp22.suse.cz> 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> <20180418132328.GB210164@rodete-desktop-imager.corp.google.com> <20180418132715.GD17484@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 18-04-18 11:58:00, David Rientjes wrote: > On Wed, 18 Apr 2018, Michal Hocko wrote: > > > > 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? > > > > What about > > pr_info("Failed to create memcg slab cache. Report if you see floods of these\n"); > > > > Um, there's nothing actionable here for the user. Even if the message > directed them to a specific email address, what would you ask the user for > in response if they show a kernel log with 100 of these? We would have to think of a better way to create shaddow memcg caches. > Probably ask > them to use sysrq at the time it happens to get meminfo. But any user > initiated sysrq is going to reveal very different state of memory compared > to when the kmalloc() actually failed. Not really. > If this really needs a warning, I think it only needs to be done once and > reveal the state of memory similar to how slub emits oom warnings. But as > the changelog indicates, the system is oom and we couldn't reclaim. We > can expect this happens a lot on systems with memory pressure. What is > the warning revealing that would be actionable? That it actually happens in real workloads and we want to know what those workloads are. This code is quite old and yet this is the first some somebody complains. So it is most probably rare. Maybe because most workloads doesn't create many memcgs dynamically while low on memory. And maybe that will change in future. In any case, having a large splat of meminfo for GFP_NOWAIT is not really helpful. It will tell us what we know already - the memory is low and the reclaim was prohibited. We just need to know that this happens out there. -- Michal Hocko SUSE Labs