Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1242672ybb; Sat, 28 Mar 2020 23:10:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtRHNeK7betP61mEnYocOkpPOJQmas600pwn5Xb7cq3D+iubIzPTJqx1mFBjSFy4+f1Guj4 X-Received: by 2002:a9d:6c19:: with SMTP id f25mr5053055otq.371.1585462206876; Sat, 28 Mar 2020 23:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585462206; cv=none; d=google.com; s=arc-20160816; b=o8oZEAveKrR+FrvX7VVbrOdajaXPuJ4U3+s6YypNei1AsPxSWsL7690P4EVjtuXZsW Bwn8RzzCtrkv6KPrh6+L4TiFBsPuBsZitN1Shk2m1cj8w8xuQLY8V8WgmZgPeQcsYvBh rnJV8LDVWXRT24ZgN1GbMCdLPwfxkAEs5pW05ldD8pdWBza6XCCrQjyNxrQznJ5ShyVX MfDnSMZVKvsWAN8d4jXNTxc4F3cavzBzPb1V17vFHbEWsygPs36GiLmofFjTZ8C3vcHr a0w8ezfjXzCrsgxiY6qAQGIbxxFfjOTxm3ztP6EjYUJQjXEHCko0DQgO1NTbZ6JVQLp+ L7qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=sSBFqFqeLi5UrtTZms8DyoR4KUJQlM9WmD2LlDYyybg=; b=bdlFF9Rlz2sNusorn6divJSCRWONJa3bus0HDkf8TDMXvCWtE3xGgG8skocKtcJRAK 9hl5Srgw3H73a77hkx2JvFCBDCUk8pibXyHkXwG1XjvNg8yacofc+BeMwJg4KldDVRkg +fxW/ePKdsE0BNnhnHRXZ1SwLSVfBLCPZr0aYWWWj9Z2X5ptQONlteCb6v6cLgoqLSqE PlRVyA4+baBzl7hLDic0A233l5peme562myTLzCnAOufflqlFCsBqLmlKjDp5ip3FIOv unwQ8oAWbNqSH31zJpLgHB5YHCItUeGe8izi5t4bAegz0ZvrYJOe4Fl9ihYmv9mSam9G hsfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="X0R79Ks/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i14si4558632oov.24.2020.03.28.23.09.41; Sat, 28 Mar 2020 23:10:06 -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=@gmail.com header.s=20161025 header.b="X0R79Ks/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727144AbgC2GJL (ORCPT + 99 others); Sun, 29 Mar 2020 02:09:11 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34133 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbgC2GJK (ORCPT ); Sun, 29 Mar 2020 02:09:10 -0400 Received: by mail-wm1-f66.google.com with SMTP id 26so13309566wmk.1 for ; Sat, 28 Mar 2020 23:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sSBFqFqeLi5UrtTZms8DyoR4KUJQlM9WmD2LlDYyybg=; b=X0R79Ks//Mf9JdUYGG/kK+i7IUBwqVVl0s/KJD69upi5amQxDdqpATosNhfaPA7CAH vHiZGDQw0hK00+oJUVDWWcOPnb3zNp8QW+lipA1q2F33cRQCnvdShc/0275jreNFlz74 4vmpmk9W9fHvImaYag5mcsVpcdhcNEOxW2r9jLGYLKnm5DRyu9evkjyrPqyImhr/zjIs glLEsa0wbklp4eiDM6U3hPyaOeGNqzIyNEiG6fLzakhOYh7OsN+b+8U/cwxmJzzhDBt6 i2/5Y5uCQE8eYSTRzfUuVOrFrIV0MhmSX1a0Sbx4rpRFb9DLFN5MslBd8Fh90zXElgZ4 EfyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=sSBFqFqeLi5UrtTZms8DyoR4KUJQlM9WmD2LlDYyybg=; b=nGMmpLr+0JKewRml6al6Ap7zTLetk3QYL4fqUeexQxp0v7pDZ2VIQHwCGH1PwWl6sw 3V6fny9VSE139KOjZxZeWeAwQrUEeiJjivQTxsOvVdEsYYJgk8j25Fs5FJPBXlZ9juBK IiEEiRg5oZuz/+E56EGElxPM0BQ1GxrceIXzX99TM+5fO9dbv5jOizTIh/EFmrHDHMQO MxTQEbePYN+a7uwMJxbwFLGWB+93ppMuacfFvi+rJHcHVSYwnnOjlNRSAmeqMJXAGuNc KF2qIG2faVLUPUPDoYld4QwDuJDdaFdyvsr6hISMJWi2Prqpf8CVgZeS9sOMjTXEpyVd 1Dog== X-Gm-Message-State: ANhLgQ2RBTETgil2XPN0UMi9sJMXzzZn54YdFbJ/onxBhC1rXiX2dX56 yah7Ed8/fx6WYylRU6ogiDk= X-Received: by 2002:a1c:7216:: with SMTP id n22mr6851879wmc.41.1585462146935; Sat, 28 Mar 2020 23:09:06 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id l64sm15482724wmf.30.2020.03.28.23.09.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Mar 2020 23:09:06 -0700 (PDT) Date: Sun, 29 Mar 2020 06:09:05 +0000 From: Wei Yang To: John Hubbard Cc: Wei Yang , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca, david@redhat.com, bhe@redhat.com Subject: Re: [Patch v3] mm/page_alloc.c: use NODE_MASK_NONE define used_mask Message-ID: <20200329060905.ha3la3jjy3woizds@master> Reply-To: Wei Yang References: <20200329024217.5199-1-richard.weiyang@gmail.com> <8d6a1cd3-75cf-78c3-b83b-c5208a209f65@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8d6a1cd3-75cf-78c3-b83b-c5208a209f65@nvidia.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2020 at 09:00:26PM -0700, John Hubbard wrote: >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. > Thanks, the wording is better. > >> >> 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. > >thanks, >-- >John Hubbard >NVIDIA -- Wei Yang Help you, Help me