Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACC9BC4360C for ; Tue, 8 Oct 2019 19:21:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8671B206C0 for ; Tue, 8 Oct 2019 19:21:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8671B206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1F6BE8E0005; Tue, 8 Oct 2019 15:21:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A75F8E0003; Tue, 8 Oct 2019 15:21:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BE918E0005; Tue, 8 Oct 2019 15:21:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id DEC508E0003 for ; Tue, 8 Oct 2019 15:21:27 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id AA2022C68 for ; Tue, 8 Oct 2019 19:21:27 +0000 (UTC) X-FDA: 76021586214.01.tooth55_46e837de43101 X-HE-Tag: tooth55_46e837de43101 X-Filterd-Recvd-Size: 2036 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 19:21:27 +0000 (UTC) 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) 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: 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