Received: by 10.192.165.156 with SMTP id m28csp916596imm; Wed, 18 Apr 2018 00:11:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx48sQa0kYsSVLTaSxzpJwz194Hd92eQnxgUc5BLlsqpXZ/CalC7u5nfPA0nRPpDQeD3vM4e/ X-Received: by 10.98.31.200 with SMTP id l69mr944503pfj.49.1524035485554; Wed, 18 Apr 2018 00:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524035485; cv=none; d=google.com; s=arc-20160816; b=zgaIvLUJaf3ExkNOcUcZp7IBVyQV4ZeLbQ0s54WZKEtxRnfNkO/abVHpGHZZJUJUUV OQVbeR7YAH9E9HE/D1Oz6jOCdGkcu/eAD2/ycmCKgrT86TwvmZqrJJK7HzSK7FzAJkJ3 rkDiBWr1PvRmu/JWXneJPlsYqpzXYqls+YE9FKy+mfjBgkJ+qHQl42jCGJ+oQnD3U2o5 PnfMI6DqwpFRY8D+03iVbCqx/wXTZA3ei3dxBsGVkfKrzHwQdt3TiCEXUWQI0N5mR2Uu 0PjU5E3yqHA7kvPkZeMuVeIQ3zVVn2YlnbJqvE2Xb9s2PrsRPGxgukMJM1tQS7zBb9/X CE9w== 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=mDo1czCGB1Np18/PjqDb+qN43sTihLqvZ4MFqFmFRZ8=; b=Lvl2IfrEX+7fp5sIUoCwYVF77YTNFH5amKH4LHpcaw7zj3O03UInqbNmkESR2ax/jD VULOrtLaypXWvV/13zI/yB7XxRGOh2voRcRSSHzKz1CQJj0GW21i0pfmcof8o5+pT6h7 orVTOqSWrp1RGGkgilDCpSGc/1QWf3WjVi3e8vjvdPJ4Fg3K/N0LOnB97GLLzs88nPxi yhXhFDL5XI09eaHSslf2mgFjAtZhYrdwAfq0SeDcSG3bZAM7Wo4LIFIyKBpOr6LcSsC+ aFok9HVC8j6y0Cv39g38h/KG9iVCim1AF9hDag6e4urxqCAnwdTyRnVxCUDZH2Nb8tcG Re5g== 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 u8-v6si674452plh.22.2018.04.18.00.11.11; Wed, 18 Apr 2018 00:11:25 -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 S1752790AbeDRHKD (ORCPT + 99 others); Wed, 18 Apr 2018 03:10:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:35955 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752022AbeDRHKC (ORCPT ); Wed, 18 Apr 2018 03:10:02 -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 94547AEB8; Wed, 18 Apr 2018 07:10:00 +0000 (UTC) Date: Wed, 18 Apr 2018 09:09:58 +0200 From: Michal Hocko To: Matthew Wilcox 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: <20180418070958.GM17484@dhcp22.suse.cz> References: <20180418022912.248417-1-minchan@kernel.org> <20180418030824.GA7320@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418030824.GA7320@bombadil.infradead.org> 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 Tue 17-04-18 20:08:24, Matthew Wilcox wrote: > On Wed, Apr 18, 2018 at 11:29:12AM +0900, 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) > > > > Let's not make user scared. > > > > - cw = kmalloc(sizeof(*cw), GFP_NOWAIT); > > + cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN); > > if (!cw) > > Not arguing against this patch. But how many places do we want to use > GFP_NOWAIT without __GFP_NOWARN? Not many, and the few which do do this > seem like they simply haven't added it yet. Maybe this would be a good idea? > > -#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM) > +#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM | __GFP_NOWARN) We have tried something like this in the past and Linus was strongly against. I do not have reference handy but his argument was that each __GFP_NOWARN should be explicit rather than implicit because it is a deliberate decision to make. -- Michal Hocko SUSE Labs