From patchwork Fri Nov 5 20:40:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605579 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F632C433F5 for ; Fri, 5 Nov 2021 20:40:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 259DA611C4 for ; Fri, 5 Nov 2021 20:40:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 259DA611C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B6120940068; Fri, 5 Nov 2021 16:40:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1025940049; Fri, 5 Nov 2021 16:40:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FFBC940068; Fri, 5 Nov 2021 16:40:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 8D4A2940049 for ; Fri, 5 Nov 2021 16:40:20 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4FD3418562F8C for ; Fri, 5 Nov 2021 20:40:20 +0000 (UTC) X-FDA: 78776044200.22.2AA79CF Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP id 8C19DF00039E for ; Fri, 5 Nov 2021 20:40:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 92CDC60FBF; Fri, 5 Nov 2021 20:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144818; bh=YU7hP/JtUSwR4tnYDgs1/WcSM6xX8jJ9zMNKGyU4QxA=; h=Date:From:To:Subject:In-Reply-To:From; b=BsSyeuLHuhGxXa30Bat/K9AXfoyuGu7PEORd+GOILNG7UGyixMqL0Xcs0AYs8MZ9Y 1X6x2an9JtBgnDEAllOWgMRLFynOzf/84nIC3f5jLLsoyrn5atRhVCxioCjBmEsBIy JvqPh2RJpHJa4ckwRbnbOGvcVL2c2I87CAFQUHgI= Date: Fri, 05 Nov 2021 13:40:18 -0700 From: Andrew Morton To: akpm@linux-foundation.org, anshuman.khandual@arm.com, bharata@amd.com, kamezawa.hiroyu@jp.fujitsu.com, krupa.ramakrishnan@amd.com, lee.schermerhorn@hp.com, linux-mm@kvack.org, mgorman@suse.de, mm-commits@vger.kernel.org, Sadagopan.Srinivasan@amd.com, torvalds@linux-foundation.org Subject: [patch 108/262] mm/page_alloc: print node fallback order Message-ID: <20211105204018.ngy5d_MGm%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=BsSyeuLH; dmarc=none; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 8C19DF00039E X-Stat-Signature: 6wh36tafr689mu6t4sk1mjiqb3r7r4a6 X-HE-Tag: 1636144819-918586 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: From: Bharata B Rao Subject: mm/page_alloc: print node fallback order Patch series "Fix NUMA nodes fallback list ordering". For a NUMA system that has multiple nodes at same distance from other nodes, the fallback list generation prefers same node order for them instead of round-robin thereby penalizing one node over others. This series fixes it. More description of the problem and the fix is present in the patch description. This patch (of 2): Print information message about the allocation fallback order for each NUMA node during boot. No functional changes here. This makes it easier to illustrate the problem in the node fallback list generation, which the next patch fixes. Link: https://lkml.kernel.org/r/20210830121603.1081-1-bharata@amd.com Link: https://lkml.kernel.org/r/20210830121603.1081-2-bharata@amd.com Signed-off-by: Bharata B Rao Acked-by: Mel Gorman Reviewed-by: Anshuman Khandual Cc: KAMEZAWA Hiroyuki Cc: Lee Schermerhorn Cc: Krupa Ramakrishnan Cc: Sadagopan Srinivasan Signed-off-by: Andrew Morton --- mm/page_alloc.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/mm/page_alloc.c~mm-page_alloc-print-node-fallback-order +++ a/mm/page_alloc.c @@ -6262,6 +6262,10 @@ static void build_zonelists(pg_data_t *p build_zonelists_in_node_order(pgdat, node_order, nr_nodes); build_thisnode_zonelists(pgdat); + pr_info("Fallback order for Node %d: ", local_node); + for (node = 0; node < nr_nodes; node++) + pr_cont("%d ", node_order[node]); + pr_cont("\n"); } #ifdef CONFIG_HAVE_MEMORYLESS_NODES