Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933854AbcKVWN7 (ORCPT ); Tue, 22 Nov 2016 17:13:59 -0500 Received: from mail-io0-f181.google.com ([209.85.223.181]:35112 "EHLO mail-io0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932273AbcKVWN6 (ORCPT ); Tue, 22 Nov 2016 17:13:58 -0500 MIME-Version: 1.0 In-Reply-To: <20161122164822.GA5459@htj.duckdns.org> References: <20161121154336.GD19750@merlins.org> <0d4939f3-869d-6fb8-0914-5f74172f8519@suse.cz> <20161121215639.GF13371@merlins.org> <20161121230332.GA3767@htj.duckdns.org> <7189b1f6-98c3-9a36-83c1-79f2ff4099af@suse.cz> <20161122164822.GA5459@htj.duckdns.org> From: Linus Torvalds Date: Tue, 22 Nov 2016 14:13:47 -0800 X-Google-Sender-Auth: XfaUtTfU_ntrzcVmb-QDbCpOHcU Message-ID: Subject: Re: [PATCH] block,blkcg: use __GFP_NOWARN for best-effort allocations in blkcg To: Tejun Heo Cc: Vlastimil Babka , Jens Axboe , linux-mm , Michal Hocko , LKML , Joonsoo Kim , Marc MERLIN Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 888 Lines: 23 On Tue, Nov 22, 2016 at 8:48 AM, Tejun Heo wrote: > > Hello, > > On Tue, Nov 22, 2016 at 04:47:49PM +0100, Vlastimil Babka wrote: > > Thanks. Makes me wonder whether we should e.g. add __GFP_NOWARN to > > GFP_NOWAIT globally at some point. > > Yeah, that makes sense. The caller is explicitly saying that it's > okay to fail the allocation. I'm not so convinced about the "atomic automatically means you shouldn't warn". You'd certainly _hope_ that atomic allocations either have fallbacks or are harmless if they fail, but I'd still rather see that __GFP_NOWARN just to make that very much explicit. Because as it is, atomic allocations certainly get to dig deeper into our memory reserves, but they most definitely can fail, and I definitely see how some code has no fallback because it thinks that the deeper reserves mean that it will succeed. Linus