Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1176103ybb; Sat, 28 Mar 2020 21:04:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsbepOUqEEGjUpJXI4IwEgvmGr4l0A3MjlGRf0D+CwD08hW3AFKw5IBaakVsOqDsRa3xTIR X-Received: by 2002:a05:6830:1046:: with SMTP id b6mr4988990otp.229.1585454640051; Sat, 28 Mar 2020 21:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585454640; cv=none; d=google.com; s=arc-20160816; b=ccQ6I4HTrjIDQlXLdpAsYfJXGWgOHpFK3XCPTrTn26vrHlqGa+9YlVi2y/LVcul0DY zoUEJu95tDukdyzbwbp8G/IxZaHjbrXN9s44ZVkQWBkjVVaOUdGjLQ6wtsz0VzvGVbVO rH4+R3LB11DiichZgDmJL3XDvh/vnSNRuQAuFTtx5IF/9SUwPUmrb7Vc25ZBTW698zGR DLnizgGGQ54Yu43iFV+MONGKelPD8jTsuKwP75mXbG5safzwXDX3BjLeloMzGGaQ8MSs /2ycgf+umYb+SpYlD1TggYofJkesVGR1qFfDt+uMD5TWX8pdJv8OzXnSLKOGZML11RqE 6KjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5Fs3IE4i4iRLLBVddscrDk15dILBhHBWSFTEWwaYXSE=; b=EJAYt9m0rh4FU4j+X+T++8K/MLjR3S9q2qBnObVaEl9VlyzvlBBVWtqov2/Z44lR3m jsW1JvA/tc1MkVygZMOPZbOFVnueW+FnCuQ7bfJB1lqho9jbMnKFxJ/9rYpcAj0HhHpe k9RvzxGRfD91tCT/bZHXMIv2wgXGbcx1GNbJaRkLB/frmY910gyRijzziXulAO/qug0y fhHvWX1X1ZFreXGfxeUgXyjn7DtP4ng+52ON799x6OMyZNOZ3wbMXDYKh/icVKOze9GS pjijURDJptrtGAR5Ga0IE+u3O7z2AZYrrJ2eJa92ExsaYGSQjpzN3zbH3W5xMEAMBeaD Kovg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=jAqvOvuM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l129si4387889oif.15.2020.03.28.21.03.37; Sat, 28 Mar 2020 21:04:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=jAqvOvuM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbgC2EBU (ORCPT + 99 others); Sun, 29 Mar 2020 00:01:20 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:6495 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbgC2EBU (ORCPT ); Sun, 29 Mar 2020 00:01:20 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sat, 28 Mar 2020 21:00:32 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sat, 28 Mar 2020 21:01:19 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sat, 28 Mar 2020 21:01:19 -0700 Received: from [10.2.58.50] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 29 Mar 2020 04:00:26 +0000 Subject: Re: [Patch v3] mm/page_alloc.c: use NODE_MASK_NONE define used_mask To: Wei Yang , CC: , , , , References: <20200329024217.5199-1-richard.weiyang@gmail.com> From: John Hubbard X-Nvconfidentiality: public Message-ID: <8d6a1cd3-75cf-78c3-b83b-c5208a209f65@nvidia.com> Date: Sat, 28 Mar 2020 21:00:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200329024217.5199-1-richard.weiyang@gmail.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1585454432; bh=5Fs3IE4i4iRLLBVddscrDk15dILBhHBWSFTEWwaYXSE=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=jAqvOvuMCuHbRMVfkrvc7NXqjfZYe7GA1kK6eR/W3qwFw9E5dbiyJW2a+LGbPfZaF 3cGLy2B/TKxRXIxTKRcGcVW/uBjF0HD+QGjs09u7il5QpX+Sgr4VwD6XhCf5EqVDtd 0PMY/9DoADs9Dm7w7NRTdIloOvXv5W5sDkvHjDTejNw5yTL2GuJkOAR4nblEC4oqsU 9Jdhdql+ZWjFo+m1dCEwNikBv6DZpJpiGSaw0aeIVD6jYh+uSf+bW5vq05w/UTGwEu zavroNvgEMrAehJOmOleZtqO/vHMWfAA6pRwg9HZaT2HnDdDHnkBMLlX26FaaENAJk vxKMVgZfKgsug== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/28/20 7:42 PM, Wei Yang wrote: > For all 0 nodemask_t, we have already define macro NODE_MASK_NONE. > Leverage this to define an all clear nodemask. It would be a little clearer if you used wording more like this: Subject: [Patch v3] mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists() Slightly simplify the code by initializing user_mask with NODE_MASK_NONE, instead of later calling nodes_clear(). This saves a line of code. > > Signed-off-by: Wei Yang > > --- > v3: adjust the commit log a little > v2: use NODE_MASK_NONE as suggested by David Hildenbrand > --- > mm/page_alloc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index ef790dfad6aa..dfcf2682ed40 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5587,14 +5587,13 @@ static void build_zonelists(pg_data_t *pgdat) > { > static int node_order[MAX_NUMNODES]; > int node, load, nr_nodes = 0; > - nodemask_t used_mask; > + nodemask_t used_mask = NODE_MASK_NONE; > int local_node, prev_node; > > /* NUMA-aware ordering of nodes */ > local_node = pgdat->node_id; > load = nr_online_nodes; > prev_node = local_node; > - nodes_clear(used_mask); > > memset(node_order, 0, sizeof(node_order)); > while ((node = find_next_best_node(local_node, &used_mask)) >= 0) { > Honestly, I don't think it's really worth doing a patch for this, but there's nothing wrong with the diff, so: Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA