Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2721369pxb; Tue, 9 Mar 2021 09:14:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyu2YGVKXvFTosT90UkXAz/vIWR5L0hEMNqqKhuyy28k0MDV6xC84BlxE3HJaWCOtkHhKyw X-Received: by 2002:adf:a406:: with SMTP id d6mr29721881wra.141.1615310079929; Tue, 09 Mar 2021 09:14:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615310079; cv=none; d=google.com; s=arc-20160816; b=oIvn/yvOa8YCBR0CodEXPrxV3XBptiGSgUa1ua+QrK8oiAxX2xveSfeHRzZUAmZz6k YWzA2wjkg6ey7lkdIUPCdcPCfRJ+Bg/BIQAwBWQ9UuEIURvPOsxnH58cRFvrdGDK4STv eW050i0CoSupZQ2/sOABeILGz9bjWntrOPxtXLPVXJu6vPNtzJUQeaYYZB5HQ7dot8PB FadBHjasNUo7yzgb6jM0euv8ABubojXcND7/QqZFENbP5HekodFsNkgw6jT4igzlu7H4 ko6lAGYiFtvQ3kEmzDYjFp53kNCP+257a+HCTOXtm9KqYZMxw+Xg++jrqd7gtzcf68MM zODA== 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=5U491TQdNsjhbIYsUSmgNKAf6MVmCm1WHLEIdhpS/JU=; b=up/O4f32MHGWI2c6WtgXW4JFVpuDJzzhLNx9Um0lVptwmXKuYIo1tJtoNBD/hGBRlp 2jJRYcd1hD70+5pdudofJGOrx4JykmUTR/ywjFZzKMOpzzh0Evy2U+fXuC5RxVGKlcIq aNMPhHF303xFGFuT3HuMa3VjaRl0aYUNoN6ZgyA0Eqce8s8M7182hyLW9Bi21l60Ezfv 1e4AQrPIExvKa7NUanenaQJ6ye2PFKvaDyKiVohA+Et6U1yVHVsEZ9cGpfttMB7dXKKi Q9w9E2UtyIMPgOOoOAcEM0Y9MTtO59BiicF6skZKsoIf3HcKa5jxyyM6Rmf74/vYTRgQ pDtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gPUvkAbB; 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 o13si9358475ejn.226.2021.03.09.09.14.07; Tue, 09 Mar 2021 09:14:39 -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=gPUvkAbB; 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 S230173AbhCIRNe (ORCPT + 99 others); Tue, 9 Mar 2021 12:13:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbhCIRNJ (ORCPT ); Tue, 9 Mar 2021 12:13:09 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DBEAC06174A; Tue, 9 Mar 2021 09:13:09 -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=5U491TQdNsjhbIYsUSmgNKAf6MVmCm1WHLEIdhpS/JU=; b=gPUvkAbBbisJ6IK3aBstPSkfYW LukBQjq/CPDnD0C7fLKVYWPdq9Iiad/BOrw2QSQfrb6a4muKVZ7KrqbRUBTR+lMUA+KCNg3xdtlQt sAGf6WDADgoDIcO5wmX6UkX1Vtz2XQLXRFYZef49Hn4NcdwbVdoz428WnEGx+0zTA6zvcLTpbvHjG JJHVj+uGRN8OrHg62WGpB64yAOFpCqCyhmX2wvRrNOMuWd4IqrETREBWRWrMGnYY5TilXWe3EhFwK goyU/0YkSUWwsxfFfzhkhX6/4xLVqLCC2FMOQ8KfyjAGZ0OS7LGeC2XNoorKDvehK520r4/YMpWxB UAOpD0Yg==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lJfuI-000q0x-T5; Tue, 09 Mar 2021 17:12:39 +0000 Date: Tue, 9 Mar 2021 17:12:30 +0000 From: Christoph Hellwig To: Mel Gorman Cc: Andrew Morton , Chuck Lever , Jesper Dangaard Brouer , LKML , Linux-Net , Linux-MM , Linux-NFS Subject: Re: [PATCH 2/5] mm/page_alloc: Add a bulk page allocator Message-ID: <20210309171230.GA198878@infradead.org> References: <20210301161200.18852-1-mgorman@techsingularity.net> <20210301161200.18852-3-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210301161200.18852-3-mgorman@techsingularity.net> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Would vmalloc be another good user of this API? > + /* May set ALLOC_NOFRAGMENT, fragmentation will return 1 page. */ > + if (!prepare_alloc_pages(gfp_mask, 0, preferred_nid, nodemask, &ac, &alloc_mask, &alloc_flags)) This crazy long line is really hard to follow. > + return 0; > + gfp_mask = alloc_mask; > + > + /* Find an allowed local zone that meets the high watermark. */ > + for_each_zone_zonelist_nodemask(zone, z, ac.zonelist, ac.highest_zoneidx, ac.nodemask) { Same here. > + unsigned long mark; > + > + if (cpusets_enabled() && (alloc_flags & ALLOC_CPUSET) && > + !__cpuset_zone_allowed(zone, gfp_mask)) { > + continue; > + } No need for the curly braces. > } > > - gfp_mask &= gfp_allowed_mask; > - alloc_mask = gfp_mask; Is this change intentional?