Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3201020ybb; Mon, 30 Mar 2020 23:54:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuQV1cwB4hVdPPceNCCK1gwrjmXKHQ9MtXGHoRcRoBqRbVgFdLrYFyyv9DWYFN0nudlv3FY X-Received: by 2002:a9d:2a8:: with SMTP id 37mr11892224otl.202.1585637681036; Mon, 30 Mar 2020 23:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585637681; cv=none; d=google.com; s=arc-20160816; b=zf9inQkJudQxBXhjB/51wz2cESk+G5e68yQ5c8V/a7B780VM2ow/qtcEauyCejdntv Rkf84J71lbYXZOVttnJMfLHqN31CQKDbgilszqD6UMKQixv/T+uEpDkP/trw8iEMYYXl LF8SuL0J6GuUu8zS+Axuzb6K4CCRRI60bNiKcRNhDzcHqA7LwZGXjYdO/ZbT+4oTxoIL j0Aj+Aidsuv77AjKk6QCmmJvlB8M/Grl+gXa5S93KeYw+xNjbL+ucdZn5BoWR/m/h3Ne PYBWXZ6OOQPdcojFAQtvoGVK2e7EnGpuNuSaVPoaWDf72bxr+GBOyya/CBgVklZndY4i UaYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TIdfTSo/e484Z3PHPHMJ/sokMhYtX+vwmXQLZC2QabA=; b=uJghgPPQ9O/yySJuhhaeTTgz2QxGiEWOVho1PDhBEBWappUijXc8QIdwHlx2pwd9HN F/P6cfd+imRUPEPm8AOWNAFTDIiV7Nk/aCp9CpufnZet+7fkKPNUgSl9cUXLL1hE1McC rVlbP0xPBzIKAapWsmYqUop6chuKr0PzAzMtEDr6imska6qM86vGHw0rxGv3S84JOUfm pazXgwgFnmo91QqDTmQ886IyMgozBbk0Qofu5YFvg2x2i7lyyibr3QbngWM0go0aQSnJ t08pA5DZJ0AjdOLQYLraTWS5FHSP4Wjn5QEyYp6wQWY723oP7+wuqu8mNGgeMbJSf0kK WcMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pBq0Oh9X; 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 s132si6247726oig.109.2020.03.30.23.54.28; Mon, 30 Mar 2020 23:54:41 -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=pBq0Oh9X; 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 S1726622AbgCaGx6 (ORCPT + 99 others); Tue, 31 Mar 2020 02:53:58 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37933 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbgCaGx6 (ORCPT ); Tue, 31 Mar 2020 02:53:58 -0400 Received: by mail-wm1-f67.google.com with SMTP id f6so1290360wmj.3 for ; Mon, 30 Mar 2020 23:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TIdfTSo/e484Z3PHPHMJ/sokMhYtX+vwmXQLZC2QabA=; b=pBq0Oh9Xy6hU00u/+o8eOfRC0LhWSvo83BSzyEEuxoSEVIKKAdARxOWS4TZxH1tM+r zRo4mw7gQWkHJZ23Q2NYuGXwArr/uRoMWqSSfWomhaFqyjWd4GbFzqNwI/HljS3ZQh7M GOgSlHdzIUGVM03X9wcySplZtR7UhLxDs4GLHwrkE5/xaMdjLZEdtL8sNaSNJNXvcNkO UUidKhR9FQFyOL7WabyBBc5KHYBIIBy4Z8+PzrcWzNhm/cvGMjn45Aac5dbDcnrQIRaZ GWQJugWgsxGsU3FpKqRkjmUK/ySbzggz35S1KB26n5gQ/jxhBjowFFW2KLTCkJ4f3yIo 3fxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TIdfTSo/e484Z3PHPHMJ/sokMhYtX+vwmXQLZC2QabA=; b=fNCb/cEnqwOCIRbMisEYSL/L7fzzCJD/zrDJWJ0Sxkboz9hyyWyhP9pRscKf01XV2k njtsE8lA4XHpX30RYlpO3DP40oAfajxfi5KuqARzwuUAQHMVieNGGBOIZ/zICDfQlAxi aZimPgVKV51pPQRZ5zQ2fyyoqhtSgH8BqPTgqedxRtul/9RDmxWJYmVzlPZZ/TD63qAG ypaiiOIqXMpgsUQER4XFRcJnU8R87qo00gUe9Bd3ScQ0Ygut9MlrOyDBKYy1yZdIEIPb onlQnz1P0g33M8F2hKUpjTPKIegzLdbHd5I/dWiy0JEsJwp3YmvhCdXFDTyyfJnnFqn0 TAsw== X-Gm-Message-State: ANhLgQ31/9rr4E1vVLr+DX2CCqYreDtYqwwLzKMCgNtwuZqE6pchn9WE 18VnXrOe/h6Yy4k8zBp3DTAQyRTgXS11bXV/xvk= X-Received: by 2002:a1c:a982:: with SMTP id s124mr1941458wme.105.1585637635174; Mon, 30 Mar 2020 23:53:55 -0700 (PDT) MIME-Version: 1.0 References: <20200330220840.21228-1-richard.weiyang@gmail.com> In-Reply-To: <20200330220840.21228-1-richard.weiyang@gmail.com> From: Pankaj Gupta Date: Tue, 31 Mar 2020 08:53:44 +0200 Message-ID: Subject: Re: [Patch v4] mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists() To: Wei Yang Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca, David Hildenbrand , jhubbard@nvidia.com, Baoquan He Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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 > Reviewed-by: John Hubbard > Reviewed-by: David Hildenbrand > > --- > v4: adjust subject/description as suggested by John Hubbard > 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) { > -- > 2.23.0 Reviewed-by: Pankaj Gupta