Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6058872ybp; Tue, 8 Oct 2019 12:22:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH3Zts6aBoGADW8gm7DJ/f4406JDc1CaaVCkpM3Mpi1qwDqQsxw8T9lvZwDnChLTtmw8XT X-Received: by 2002:aa7:dc55:: with SMTP id g21mr35027839edu.210.1570562536266; Tue, 08 Oct 2019 12:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570562536; cv=none; d=google.com; s=arc-20160816; b=fyw6/AwiW6i/zxXd0SIYIfYQwIRsetfEi2tNgacEWBK7vux3rblqdegh9HTxOrMboL oJtS6QzrgVrznOvAszYqcqdlj+F30pr2K4V/wJZHirliJzibYW8GYS2x2g095FlRur95 7WC34MKhpxLErtcYYDrxL9ABJ4goIlHaONCe/lEEccEXnGK7exPOIr0Q22hjr2ZYPvbg CpNAenan3TBMu2JzwbDuDc+7RSliOSMZLqO5Ru0L8PGufKkVkJvjDPxa+1YgbCfnhv8X mwJ5xAC/ID3ysm15CI+t7qbEoIVwjqKwmwgp9ERhgDB9M+gNA2sd6CHaF6JuS5gdUZEC kKgA== 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:message-id:subject:cc :to:from:date; bh=ofO5XgG+kZT5Olm49Z7tckWAcy7FxyJciP5T1fHj/yo=; b=AJF8jHOPwj3+ZVD4fRI4RVCHsai08XfFow8/z7PWYfKsZvKwlyFc3Ys7uP1pGR2MC6 nO8tKI6avBDreKgOuXBAFq+Mwpt9SXRDTQ4iiNPxUVrxRe7lr/Tw4lTo0SlcInaGXPLZ oW728HAa/kd9Nq1Wwb2yDDBjvkbVY0xQvJRglzEmpldGVMYX1gSd26YJJ3lUqbc+Rzs8 91JVNMlgnLi7oLq5TeO8HoD+w0LVt4ukHoadD6S4kHQNEefwH/gESJvUhySMAlx6xGXx 6zyWy/Junb7zPy0uq2ned4+FcfEdNUlIKfIH72MV/KiE90zvVHVqcwbh+c1c9isfTZWG pMug== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c48si11140529eda.100.2019.10.08.12.21.52; Tue, 08 Oct 2019 12:22:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730128AbfJHTV1 (ORCPT + 99 others); Tue, 8 Oct 2019 15:21:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:34880 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726439AbfJHTV1 (ORCPT ); Tue, 8 Oct 2019 15:21:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9689BB147; Tue, 8 Oct 2019 19:21:25 +0000 (UTC) Date: Tue, 8 Oct 2019 21:21:24 +0200 From: Michal Hocko To: Christopher Lameter Cc: Kaitao Cheng , akpm@linux-foundation.org, sashal@kernel.org, osalvador@suse.de, mgorman@techsingularity.net, rppt@linux.ibm.com, dan.j.williams@intel.com, alexander.h.duyck@linux.intel.com, pavel.tatashin@microsoft.com, glider@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song Subject: Re: [PATCH] mm, page_alloc: drop pointless static qualifier in build_zonelists() Message-ID: <20191008192124.GT6681@dhcp22.suse.cz> References: <20190927161416.62293-1-pilgrimtao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 08-10-19 19:06:57, Cristopher Lameter wrote: > On Sat, 28 Sep 2019, Kaitao Cheng wrote: > > > There is no need to make the 'node_order' variable static > > since new value always be assigned before use it. > > In the past MAX_NUMMNODES could become quite large like 512 or 1k. Large > array allocations on the stack are problematic. > > Maybe that is no longer the case? CONFIG_NODES_SHIFT=10 is nothing really unusual in distribution kernels. Likely wasteful for most HW available but a proper way to address it in this particular case is to use a different data structure than drop the static modifier which seems to be more of an misunderstanding than an intention. -- Michal Hocko SUSE Labs