Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1151590pxu; Sat, 24 Oct 2020 02:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNF7c/Ju6KDSkDD2+CZH/u+JK2g4e4SftEMbBluNbb6fxUeHHMdaUvlE6TNLTffleu2i3E X-Received: by 2002:aa7:c3c7:: with SMTP id l7mr6279557edr.213.1603530242304; Sat, 24 Oct 2020 02:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603530242; cv=none; d=google.com; s=arc-20160816; b=pjIsv8mpOsWuvKexGtejDxN5Cnfjm6GlV8S0DwxdJxRg8FEdFC9v1qsb2K/ztW/S2l aAIJVl/nCRDlKWNIifAaGw9o5Mo0KacZH+x7G5B9T8NfulyZPhBQ6POLISAbJ1WQyy0X Mp6FUNaAk2w/xfqdb4pZGNbOJYqdyYWpZlsUSPmHAi7BCP5JfSlKxpvZWrDMTTv1VlBe Oeamz3LiixRQ5+441v50My0snceeni2gJq/Kt0rCJGpcrpZZdgyxeub8NEA4rOBcbW7d cyFgEpYbJ6BsuSOrIdUHAoq2PbWofjVqNhXGr8RBElc31HBfGAvf1uoYAnX4mo4S/C3U 1nDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=URKMB+l8lr+9mNV3UVoDcLLnTLfY/moWX1npvKJgs6g=; b=VOBeMJs17iKdEMt/PuUAS7xxivZ0c8f2QxFHTOFr6pJq71zDkBrqNj3Mh7KBiz5gcM HCNIzAhu1QzQZ/b61cLTTCR5wbthZNW6S4CDFGZFuDmqAvNOpfgriDuMBw4Ope+5uGMt Xb9LoM8bLFl+TqA9NXnkDnH7ipvZi/G8NCaMSw6X4e1URF+VAcRNiECcxDCQLpsdLKHM hxz8jQgm1fzI8wD2MIY0uOxYSwQ6SPqeHICNL05FdHP1B/yz7ThlX0bh7QSGF0UMfz1S KwqfuyoXHcQWC4/IK3sv6gpyLjr+K/hu5JdZjY9vbTpQlfiv8H4Z478G6vFnjQGPS7ps qimQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=h1zpfDEg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si2430208edb.432.2020.10.24.02.03.39; Sat, 24 Oct 2020 02:04:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=h1zpfDEg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755331AbgJWVJr (ORCPT + 99 others); Fri, 23 Oct 2020 17:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755323AbgJWVJr (ORCPT ); Fri, 23 Oct 2020 17:09:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB443C0613CE for ; Fri, 23 Oct 2020 14:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=URKMB+l8lr+9mNV3UVoDcLLnTLfY/moWX1npvKJgs6g=; b=h1zpfDEgO90CZITyuoe0+XKlAq TnHTtX9Vne+elsmCyPlv4dvH419GP8HJgSvDu3d94ciTv985sCImVUZBEeL0vZqhVjHAzUjULo52q sCXqE7ziAOp8jR7OaSIIKh7yie11M7fYPPhtW3xc/oAykCJft7oTZ7Xl9uPsO8nbIT66/gj1++x4O taKLmy9FaBXu9Yeq8J0GUYMJceOOLFh+DQMbsiYQWhC1ZTH1jbnzdSC4VWha/lvYbSc9WvyMau3vP MLlAoaXg7e8952+Dv7X/kvELtT9vFDfDJHj9y5MV/vvnD/kwxmJXV19CQ7RHrmHj5KvJeptTbc7mH 3OC1Ml9Q==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kW4Jb-0002Lv-VJ; Fri, 23 Oct 2020 21:09:36 +0000 Date: Fri, 23 Oct 2020 22:09:35 +0100 From: Matthew Wilcox To: Rik van Riel Cc: Hugh Dickins , Yu Xu , Andrew Morton , Mel Gorman , Andrea Arcangeli , linux-mm@kvack.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm,thp,shmem: limit shmem THP alloc gfp_mask Message-ID: <20201023210935.GG20115@casper.infradead.org> References: <20201023164708.5842f3fb@imladris.surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201023164708.5842f3fb@imladris.surriel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 04:47:08PM -0400, Rik van Riel wrote: > +++ b/include/linux/gfp.h > @@ -614,6 +614,8 @@ bool gfp_pfmemalloc_allowed(gfp_t gfp_mask); > extern void pm_restrict_gfp_mask(void); > extern void pm_restore_gfp_mask(void); > > +extern gfp_t alloc_hugepage_direct_gfpmask(struct vm_area_struct *vma); Without the types, the name of this function makes me think it allocates something. Like alloc_hugepage_vma() does. With the types, it's obvious that it gets the gfpmask. Can this patch rename it, perhaps to gfp_t vma_thp_gfp_mask(struct vm_area_struct *vma); (hugepage is also ambiguous because it might be for hugetlbfs and we use, eg, mapping_gfp_mask, not mapping_gfpmask).