Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1209656pxf; Fri, 12 Mar 2021 04:46:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEHKfNmIDu2nrSURKAd2GnATjPAy3Jcpzd6e89W87Bb4Wq/+wO495ZqzrAFe5RpwD4NXiY X-Received: by 2002:a17:906:3881:: with SMTP id q1mr8408005ejd.490.1615553186557; Fri, 12 Mar 2021 04:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615553186; cv=none; d=google.com; s=arc-20160816; b=M9IpUVNjif4ra6RElHH1TF/NlpnVqiXOsIEQoJRzEPF62HGrH+olNhltXXVtyDNRp6 6+wiAb63QlJgfiIMHo7ETknH9ie+5ePlJzsBugYeQ54Vsf63mrxSvZdIzRDqz4XwfMmD TqeNVqMX6U6OK0+UPmZn/Ned8qhZjcRA1BSepJgNM+CHrkbMG4U+sd9VLM6MK/OR+Ueo NHrbfdHBc7v1QLUUbHsaDBOgGkcl+HaMvT8PROWJtvSpObNRKqfuT2WdYNazdx4UU640 yRtEXEWp9bCT50W5WoePig4ehJ2yIOyo/VnpsmSN9Yz+X3C1nX7zrIcAi/8LyA81p5h+ m5jQ== 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=kA2zAbVU2u9LtJpiwYGKaIj40CL11SeMzPwy8fqCxkY=; b=r8obkXMgKKkCFtuXKDPS6ybU4ZqXNVdX0CCLaCXnyjmfiMYZxMjHDJu0DvX0HDrSDf Eo7L7zpo7V3jkTiLmb0cZlYoofeTeJ0nuRDzLtw6wN+q56tXGSa806yrpNP+c2QahoUd mGAep7SpawLAnCENlw3Jbw1eB8yAV02zE16V6SxdhXPEDjoiAYdH3FmNlKVMmXuK+6/y DsQ4DsDoS8kjtdfGEqhwN0qFLFBuup9CA+iOWppTYvHajV4iBrFY2jTJFDpzgDojyfY4 ti+qNmkVJE+RmwYlT8u+pMZRyzyIMEZ57UoijHk5djSMcT/Z7ZlEYbIVp/omiRl819wn yVsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kf7NOn2K; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 r13si3777944ejz.18.2021.03.12.04.45.52; Fri, 12 Mar 2021 04:46:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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=kf7NOn2K; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbhCLMoR (ORCPT + 99 others); Fri, 12 Mar 2021 07:44:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbhCLMoM (ORCPT ); Fri, 12 Mar 2021 07:44:12 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50C65C061574; Fri, 12 Mar 2021 04:44:12 -0800 (PST) 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=kA2zAbVU2u9LtJpiwYGKaIj40CL11SeMzPwy8fqCxkY=; b=kf7NOn2KwwvzyGg78S230QQcFN MIXvadkSKEGfs3IHGJYDuqpq7MQvxUHU8YT1P8C7AoXgk/YM55DC8ixq3tLScOup5+O6bBCL/4JCg c8aAkcRMZMUU0iPxI0YHCmqB1j5nivVV7u8fXzId29IajJupo3WZOMQVJ9HjrGxBlvU60ue7gnFmr aQP7ZFF+qIVomRCv4AL4WFChMBhJDpQLWNHdV57AFLYIdTvsWmWrbJg0sCLvBYRXn9GAKns6AoM56 3q48mGoGEOR8JwVIwMbtxOA5aND4OcK+zojxIaDwMqVwZQV5n2xLMvdZ37fEFAJUe34nQeuv2S+kk /+WdLXCg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lKh8d-00Af8Y-Mi; Fri, 12 Mar 2021 12:43:38 +0000 Date: Fri, 12 Mar 2021 12:43:31 +0000 From: Matthew Wilcox To: Mel Gorman Cc: Andrew Morton , Chuck Lever , Jesper Dangaard Brouer , Christoph Hellwig , LKML , Linux-Net , Linux-MM , Linux-NFS Subject: Re: [PATCH 2/5] mm/page_alloc: Add a bulk page allocator Message-ID: <20210312124331.GY3479805@casper.infradead.org> References: <20210310104618.22750-1-mgorman@techsingularity.net> <20210310104618.22750-3-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310104618.22750-3-mgorman@techsingularity.net> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Mar 10, 2021 at 10:46:15AM +0000, Mel Gorman wrote: > +int __alloc_pages_bulk_nodemask(gfp_t gfp_mask, int preferred_nid, > + nodemask_t *nodemask, int nr_pages, > + struct list_head *list); For the next revision, can you ditch the '_nodemask' part of the name? Andrew just took this patch from me: mm/page_alloc: combine __alloc_pages and __alloc_pages_nodemask There are only two callers of __alloc_pages() so prune the thicket of alloc_page variants by combining the two functions together. Current callers of __alloc_pages() simply add an extra 'NULL' parameter and current callers of __alloc_pages_nodemask() call __alloc_pages() instead. ... -__alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid, - nodemask_t *nodemask); - -static inline struct page * -__alloc_pages(gfp_t gfp_mask, unsigned int order, int preferred_nid) -{ - return __alloc_pages_nodemask(gfp_mask, order, preferred_nid, NULL); -} +struct page *__alloc_pages(gfp_t gfp, unsigned int order, int preferred_nid, + nodemask_t *nodemask); So calling this function __alloc_pages_bulk() fits with the new naming scheme. > @@ -4919,6 +4934,9 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order, > struct alloc_context *ac, gfp_t *alloc_mask, > unsigned int *alloc_flags) > { > + gfp_mask &= gfp_allowed_mask; > + *alloc_mask = gfp_mask; Also I renamed alloc_mask to alloc_gfp.