Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14182851pxu; Mon, 4 Jan 2021 15:27:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyknCLRShfCFhvfC2Df3iyb0XZVdXX5lQlaCQHu43usTZNmjottXAp9HOG4VymGt93v/x91 X-Received: by 2002:a17:906:447:: with SMTP id e7mr67686451eja.172.1609802832812; Mon, 04 Jan 2021 15:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609802832; cv=none; d=google.com; s=arc-20160816; b=Di+845wxBNTVF5nFK5wUiMVYJCXlqqJhD2NtA/HK4Ge7NIyQ0MMcVPdLT96nYzvI1t APbMnbj7560FUcgMNok68v6Ck5fDS11+TAkgcrZ/voUMAftXCDHFT06JH3eroHI3BWok z4Gdb6m9vFyLvxxqfssSIEHKKbKTlfI1RMTIm71yV4DFGPy0L6w5CWotnVsvT2r4qSoN IouCtYZCTc1bUExOz2jC15mf9kvaVtJLiGSfxs7q8EkO/LASkG+PbDIJrV+2jDBC9Q8U j8Z07FQ8u4dUK6gpf3BOqVAB5aIift3T91H5qhrqv5udbaFRCGdSswsoPGhEDFfUEvYb lWaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Ok/c6ILRn8wuYp83HmCV+PfK4tJlkHqzzMv8UQD5plA=; b=YbqWYqUsgjay8GRaB2du7ZKwF/6cqbKNaK9U/ej25sYqxFa01Hgouw+M1T9xMDFWmy MEesNQyEV478aVnX+u3KZVBSNxylijoLx/g6oP21PPK89xiXCzODHvGN4o/GX0QZtA51 PXzvmrw/9wMxLtEMk4cPmJSW2YOOawP6i3e+wAyPe2un5pTl05fCpmLAnaA4VylIQ/jF N91kgkwWE3DgNTxlevBicqCZupvmWRSvmLyxD0LvuRItpFcnSyD3xCvlUofGR0cqipNY YJ7S88G8DXKE59CMig+g7mRVehQqhJJUqizYo7a0+qO3pxC9G/wni14usj9AqkYzdxS6 hXVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=P4dNs6Dh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si31147914eju.355.2021.01.04.15.26.49; Mon, 04 Jan 2021 15:27:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=P4dNs6Dh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbhADXYi (ORCPT + 99 others); Mon, 4 Jan 2021 18:24:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:55618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbhADXYi (ORCPT ); Mon, 4 Jan 2021 18:24:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DBE31206F8; Mon, 4 Jan 2021 23:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1609802638; bh=/J9lOmW1YaeKRhNVv8DZ4Ehhw7//zHi8b0Ji/4NfsR4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P4dNs6DhpupKwWDgq6M18i+ydv9hR1ncOpcGuAPA1AqQwa7R/N0dql+dW/xi1HMH8 XR6acxwKb2N/cl2Jxpl5NAye2BP62lqyIFJbPqWvERy9f025hqUp1GgQTjI6WFS13v /nvqnFLn5C5ZFs1fV638Y6NEyvj0nOw7YVdGXl3U= Date: Mon, 4 Jan 2021 15:23:57 -0800 From: Andrew Morton To: Matthew Wilcox Cc: Hui Su , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko Subject: Re: [PATCH] mm/page_alloc: remove the static for local variable node_order Message-Id: <20210104152357.d56d10e0443bae984a174f18@linux-foundation.org> In-Reply-To: <20201230124233.GE28221@casper.infradead.org> References: <20201230114014.GA1934427@ubuntu-A520I-AC> <20201230124233.GE28221@casper.infradead.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 Dec 2020 12:42:33 +0000 Matthew Wilcox wrote: > On Wed, Dec 30, 2020 at 07:40:14PM +0800, Hui Su wrote: > > local variable node_order do not need the static here. > > It bloody well does. It can be up to 2^10 entries on x86 (and larger > on others) That's 4kB which you've now moved onto the stack. That being said, could we kmalloc the scratch area in __build_all_zonelists()? And maybe remove that static spinlock? (what blocks node and cpu hotplug in there??)