Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759646AbcJRKiq (ORCPT ); Tue, 18 Oct 2016 06:38:46 -0400 Received: from verein.lst.de ([213.95.11.211]:35640 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752588AbcJRKik (ORCPT ); Tue, 18 Oct 2016 06:38:40 -0400 Date: Tue, 18 Oct 2016 12:38:37 +0200 From: Christoph Hellwig To: Chris Wilson Cc: Christoph Hellwig , akpm@linux-foundation.org, joelaf@google.com, jszhang@marvell.com, joaodias@google.com, linux-mm@kvack.org, linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] mm: mark all calls into the vmalloc subsystem as potentially sleeping Message-ID: <20161018103837.GA8945@lst.de> References: <1476773771-11470-1-git-send-email-hch@lst.de> <1476773771-11470-3-git-send-email-hch@lst.de> <20161018103359.GM29072@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161018103359.GM29072@nuc-i3427.alporthouse.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 617 Lines: 13 On Tue, Oct 18, 2016 at 11:33:59AM +0100, Chris Wilson wrote: > On Tue, Oct 18, 2016 at 08:56:07AM +0200, Christoph Hellwig wrote: > > This is how everyone seems to already use them, but let's make that > > explicit. > > mm/page_alloc.c: alloc_large_system_hash() is perhaps the exception to > the rule. While alloc_large_system_hash passes GFP_ATOMIC it still is called from context where it can sleep - I think it just abuses GFP_ATOMIC so that it gets an "early" failure. For which GFP_ATOMIC isn't exactly a good choice as it dips into additional reserves, GFP_NOWAIT would have probably been a better choice.