From patchwork Sun Mar 29 02:42:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11463895 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45E56159A for ; Sun, 29 Mar 2020 02:42:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 01E872071B for ; Sun, 29 Mar 2020 02:42:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Wp+IfQa1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01E872071B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 336606B0010; Sat, 28 Mar 2020 22:42:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2C0756B0032; Sat, 28 Mar 2020 22:42:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 160C96B0036; Sat, 28 Mar 2020 22:42:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id F033A6B0010 for ; Sat, 28 Mar 2020 22:42:34 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A13C752A6 for ; Sun, 29 Mar 2020 02:42:34 +0000 (UTC) X-FDA: 76646851428.27.blade79_6dc898a88330e X-Spam-Summary: 2,0,0,b7ca8eaf89f853d8,d41d8cd98f00b204,richard.weiyang@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:4321:5007:6261:6653:7514:7903:9413:10004:11026:11473:11658:11914:12043:12296:12297:12517:12519:12555:12895:13069:13311:13357:14181:14384:14687:14721:21080:21324:21444:21451:21627:21666:30054,0,RBL:209.85.221.66:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:22,LUA_SUMMARY:none X-HE-Tag: blade79_6dc898a88330e X-Filterd-Recvd-Size: 3687 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Sun, 29 Mar 2020 02:42:34 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id j17so16700626wru.13 for ; Sat, 28 Mar 2020 19:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=m3v4eUN1Q8sQ8xavWGBmWHQ29/mKNFiqKaIswR2Yr2k=; b=Wp+IfQa1bYEpqrV6Mbx4pfI10yrDhmVCxHQvAGH4iHMos+E6LOCSjJxtPxMZx4WSHK /InfH8Ekfl1xp4NqzOVpRsz9Pi+bf1Uukp1Gwa3ih1PB1g8Kc7sFHuom/blQX/m8Qqf7 dYP012oQADT7bZgf3H5FflM7AWDutupoDDHwIDQe/MQb/GriG2v9S9jXvfiPXJZrNOWD 59GeUJsZQBnRBnF8txlGxAHIWw3mj30JidpLzV3ZBtWUwWVQ8BDFQbiacTUosyzXfVz7 bXZ8iIBvkfDOmkHN5jh5Sz22zkirrUPn075hUdQkTcKB9dVop1LjHkKtY5sIYVpaHIJh ktbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=m3v4eUN1Q8sQ8xavWGBmWHQ29/mKNFiqKaIswR2Yr2k=; b=AvFWQb8xCJ9IPdGCxWduJhwlQgUrc0z7g37KPRie7LjwVSzk5ql48puhvTXgmAY8lo +cQBo7dohMBbgA3j7RLPKson4wjVpn79dtUWTfqEcJqsd8Q2u0VLa3Ys3GDXLjAJywry qw1AETssvtIjYkNmNDsAxUPvwu6Dam7IYsc3Sg9Y4TZaonfb6QprwlmO+YkyJ7YpwVb/ jEKOwv5AW/Utn0fHc0BfVGCBwcjEDzvFVQc8NOxaDTyv3fVBBuQ7/0wQf1IqqefG3KWK NlpObmE72dQtDogiFJZq7bgA6kHv4YBLVorsO+Au/4r7WhOdMIz+xZqomv4AhJP66yBT /GUw== X-Gm-Message-State: ANhLgQ0qgEEuat45vWG5SsnYbt9335iQ4RLVoZpspcJRIsnHokROcDVY FiO1NlD7rhJsQwuwhFgkbGM= X-Google-Smtp-Source: ADFU+vvDMaN/xFKcdo5GXeR+Nf9wdCY1mQqmhctgMpGp5GkhHcHVIdNK4pqxB3hqLdMZlMiOcEzXKw== X-Received: by 2002:adf:b1d8:: with SMTP id r24mr7701334wra.266.1585449753286; Sat, 28 Mar 2020 19:42:33 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id t10sm15424374wrx.38.2020.03.28.19.42.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Mar 2020 19:42:32 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca, david@redhat.com, jhubbard@nvidia.com, bhe@redhat.com, Wei Yang Subject: [Patch v3] mm/page_alloc.c: use NODE_MASK_NONE define used_mask Date: Sun, 29 Mar 2020 02:42:17 +0000 Message-Id: <20200329024217.5199-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: For all 0 nodemask_t, we have already define macro NODE_MASK_NONE. Leverage this to define an all clear nodemask. Signed-off-by: Wei Yang Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand --- 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) {