Received: by 10.192.165.156 with SMTP id m28csp801262imm; Tue, 17 Apr 2018 21:18:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx493YoVd8/M1868RDMKYWIfXOYWlJVe88qwt3Bxyi4DCmrt20xJjfNAF8UMQ5IcazwGqPMz9 X-Received: by 10.99.115.82 with SMTP id d18mr495847pgn.52.1524025085181; Tue, 17 Apr 2018 21:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524025085; cv=none; d=google.com; s=arc-20160816; b=pUbgT3A2+urwpItYq3Kix56NT42g+XgX6iiBu+My+iX2LkF/rkNi6NnPo9axTzX4+F 6t2ZOQGs4/lODu5U1l1UzlhSpPTzwQMYfN+uDwfp8brqyd9QzKRQX4h/dDbKNVgnaBz2 HiY1FeSuBsJVq+9y32OjgT3Luo1TnetIgiv5w9XYOs9Q7PrNS/N/3bBnNPfHrT/41PpP 7w5q77cL30AjD3I/SQrP1IC+WkYSjF35x98D/PKR9eZXpJhP8sMJuP6vDTDM/a7RTSxY StZcifI1igzX0OSkaTsNuXYLotVzCPCLTv9Z60Ix9gD4QPRTkQPwyR1AY/mwl9ZjVgdd JImw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=2MBK9A67nBmhxRdYtNT2K3ltYhuJlYFlVhs8W6x6Ndg=; b=vLiEpUWOlWZcE19XM8JYTCetsLlZQ2y+G4h+NxUjS8nV7dTuwz18oleMhLMcY4CyeP cScPfe1Si6u7Mx9Zru/769RdNaivVrT0xbcJOzrj1VULm7+WWXJchw3djfTvTDNVdQ3E wv6KZsfZvHAR7VUZYGKSHVUYgxFvaEmL1nkkwRG+FkZww9t/FCs7QGH5NOaXLx02hBp8 Q6cFehPiEsks8OuRG6w4Ux57TW5LOF2kSq2MDIhLzbnprofCX4P3wA1/kSS5W32YJr3c pXxr16hzFmVCUfCNIFePbQtTn4Pse8COwAqEfyXmBuLK4LufP95vwZPvGcU/u5aSisTy cezA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DLI75hs6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si419450pli.50.2018.04.17.21.17.51; Tue, 17 Apr 2018 21:18:05 -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=pass header.i=@google.com header.s=20161025 header.b=DLI75hs6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbeDREQp (ORCPT + 99 others); Wed, 18 Apr 2018 00:16:45 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:41162 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbeDREQo (ORCPT ); Wed, 18 Apr 2018 00:16:44 -0400 Received: by mail-pf0-f196.google.com with SMTP id a2so252358pff.8 for ; Tue, 17 Apr 2018 21:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=2MBK9A67nBmhxRdYtNT2K3ltYhuJlYFlVhs8W6x6Ndg=; b=DLI75hs6QiAp53vMm9C0RjcB3fpv3qGcXS/lNu9UDlsgHBjvDwK66N4OUNKWOZpB2w g6TaEGR1J3qplpiEpIuNknekxQglDsC0H7ymP9AjWJMuxqPZyTZI0keE2GFmnJGpviBI Zv7SNf+yYET4uaAzuXvUrkjkwtYMsTvb4uSwLXoQW5/6C8bob5njd9Q6e6RRfI0hsEV8 4wiLg/mn0+npPMUniSYcPjT/OAYf5VgP+MlKaAmR+rB9sufcG7BMNp6Vcih/tX5CR+Yl UzsuitsdcBQxt/0d0sZOwWJOiAs3yTFVdEtzl4Db3CJJvjPDQo88Ayv7kVxEUiCqpZLf lTDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=2MBK9A67nBmhxRdYtNT2K3ltYhuJlYFlVhs8W6x6Ndg=; b=kQZx2CsPhJyBbPCQNsfbfdl2CUsdKWl2aT1XN2f1jMObF+EF4azqK5OM8VIYsBOaVE Ej/ZEsq7ulnZvn2L7JAPQvNZcsdpivqXSmc2Bn36/6FVgj2FY/XdL96VGHqbYfZO9Jb+ ppuCa4w77YkZ6GC8zfWt40apb9sb0H5XiEEZpTO4PXZkhCdhEYlM0FJm9+iMEFMmmwZm fM6eVGyJswiCiv5ZHvDgv8vKCV0+iKoGPXtchYjViNwsWRJyhifriju2Jeh8j/+FaK70 Ncy18rp+bhX9G5istPbgDEdFn6k5qTnZJUNkVoWaz1Ztiao51nxd/eAUFnSzY8TJo2YM 5cTw== X-Gm-Message-State: ALQs6tBjyx+SZpc08tinwOuni2N6BNvuZemkVXF7eBgKWii4Z2dg0epX 7rxsIRrznOebjzR+1pGqBqsDQQ== X-Received: by 10.98.171.7 with SMTP id p7mr504478pff.215.1524025003688; Tue, 17 Apr 2018 21:16:43 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id x25sm438106pfn.124.2018.04.17.21.16.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Apr 2018 21:16:43 -0700 (PDT) Date: Tue, 17 Apr 2018 21:16:42 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Matthew Wilcox cc: Minchan Kim , Andrew Morton , LKML , linux-mm , Johannes Weiner , Michal Hocko , Vladimir Davydov Subject: Re: [PATCH] mm:memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create In-Reply-To: <20180418030824.GA7320@bombadil.infradead.org> Message-ID: References: <20180418022912.248417-1-minchan@kernel.org> <20180418030824.GA7320@bombadil.infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Apr 2018, Matthew Wilcox wrote: > 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) > I don't think that's a good idea, slab allocators use GFP_NOWAIT during init, for example, followed up with a BUG_ON() if it fails. With an implicit __GFP_NOWARN we wouldn't be able to see the state of memory when it crashes (likely memory that wasn't freed to the allocator). I think whether the allocation failure should trigger a warning is up to the caller.