From patchwork Sun Feb 24 12:34:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingfan Liu X-Patchwork-Id: 10827883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E7DCD922 for ; Sun, 24 Feb 2019 12:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D639A2B655 for ; Sun, 24 Feb 2019 12:35:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA0712B7DA; Sun, 24 Feb 2019 12:35:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E78D2B655 for ; Sun, 24 Feb 2019 12:35:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 013028E0164; Sun, 24 Feb 2019 07:35:17 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F03138E015B; Sun, 24 Feb 2019 07:35:16 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7D8B8E0164; Sun, 24 Feb 2019 07:35:16 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by kanga.kvack.org (Postfix) with ESMTP id 91C108E015B for ; Sun, 24 Feb 2019 07:35:16 -0500 (EST) Received: by mail-pg1-f198.google.com with SMTP id y1so5047501pgo.0 for ; Sun, 24 Feb 2019 04:35:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=eww4YGVNqaj9wRyOutY/EPgdrl5kM4y1BOCar4JSDOY=; b=HuX+3YsVseV7IVwiUlzO6ZccRqn630ICH5lm1WHgwb3bvAn6J/1HpX+rz4smgqTBrH gIpIjvo4elecrobzgTp0ulwi81OQAWt94r5bPJ0e6oknMf4iOib/aY/7TUAV23IBUl0z GsVtcu0XFCZcDPxzyetsFZ5y0CQyeX1I+M/Ku+gseMlk1WYTqQWFQSV9DYsy12cpUbtm DbEcrto7c9EV4LSgjrSm+sIGQmmQzySWC6165rj2DOCPAPNru6A6Ad5VM+9syAXEaRRf hbsntEdFJptpitS0Uxun6N3SpKTToH5yOMG1u/Frlxb3JcjZUWu0I7pFFL+mYKCcElAV KQRQ== X-Gm-Message-State: AHQUAuala+VwX4aI/mkni2NmE3AQ1TJQSjdjLZfKCZdybE7MgWJr8mYZ lGySzuJRUe7FnoDtGr6szI6UhfzxvdKXpBbZyIAgwN43B/iBGA7osiDnLPAnW1zkeSUQMKii/gA IhOph1GMFsIc9t7popr02qfjyeFx7btRfX/C2LJG/RVvczQBWX3VrVMTh1a4u08LVRZbQXPCcsU wY0pT/xDOGJgm5qd+l5C7DS9EZ1hjSTIfk52Wro7IDoQyv8UoR4XstUGeulm/94xXE8qIvRSMsb HVkUJrwEEn8rMy5YEwUCQEwy1f0HRx/sVc8UTg1g9hHMaOLP/mYqHW2SiiNpVnLGKOdZC4TdX1j cHWu56SIx586RKeA1Nw6uC99JHIVvlEbRiJjIRT4T4V2MHx95MoDhnM56V76ekmtxzJ64hOuO4O c X-Received: by 2002:a62:7042:: with SMTP id l63mr13555122pfc.1.1551011716267; Sun, 24 Feb 2019 04:35:16 -0800 (PST) X-Received: by 2002:a62:7042:: with SMTP id l63mr13555028pfc.1.1551011715244; Sun, 24 Feb 2019 04:35:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551011715; cv=none; d=google.com; s=arc-20160816; b=nqal2r0QEJ+fnM2rcmLkh0HHUGOxuUJF+KijHEVtB2ooOn0l3nxq/NtuPHAkjowOqf zXBNqeZVTFZyFEZcIbhXA9Asjc5KUuOwRW/lfA2OJn8nSLHv5Q5xZ4lsoUJCItMsz8M+ PFyQTbU+TihkfrtqRhewqOO8cQX8K+admBz7P3YtR18U+dKEluWPA3erSOP4ltszG05A Nt3lzZeLvXjCo/nbV0ztNAWe044x2vHRP2iHskxHAqVCZkTxids153UMUY8UAIUG1XSu JiHvzcRiEaqBVa9ZO4uZ7uluAiOV1JnFy2KBlYQhgS4Y7onzEqNSvTqL6tvDNzYfF/o5 l+Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eww4YGVNqaj9wRyOutY/EPgdrl5kM4y1BOCar4JSDOY=; b=yWkIGSLpP2Wx76ue9JLME5lbfXFc1+2NaJxegqdqDHi+aNexuS7DF3BT29gZ//8IzZ 0/+FcUzHsoYBNhl0x9faES1LFZeCyFfEDnHScsuQcJ1mxA42yUkHYyYYF38IHpWUlKKV f3RZnMeKHbh3h839Rvgk6WOujjwcIVBneGbYSTwiY4fG/CZD0VaXroulKlBOZF0M+rpZ cuZYLKBz9flB2thQRSImQAIwANF6lL07cW/T72eDMArcAZeP4iwSPUulB4gJk/L4tdOX fz44POlGuQNl5vhexqES9HtYggtcU6Ujz12PnGrBuSLhD6NxASR5/Ry0HjN6PiX6M3/A fnZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jxyl5I/2"; spf=pass (google.com: domain of kernelfans@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=kernelfans@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s2sor9934344plq.22.2019.02.24.04.35.15 for (Google Transport Security); Sun, 24 Feb 2019 04:35:15 -0800 (PST) Received-SPF: pass (google.com: domain of kernelfans@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jxyl5I/2"; spf=pass (google.com: domain of kernelfans@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=kernelfans@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eww4YGVNqaj9wRyOutY/EPgdrl5kM4y1BOCar4JSDOY=; b=jxyl5I/2HwfMWNaGOrGaBhrL0uom2+tVm75LY7sjNFlCLVt1Go95qKPHLyi+GivV/u /sy5MtB0kqC+sTReLVH7GmkIel6oG0y1x6r1Lmhc1EoQh+cg/uF+sJresUakl6SVRV/1 cTXRXIIBjjf9mRXZI0M+YNTQayY5rZ2b6BpxoBR50Nia9aEr6CBuDB5fWfCuSgYt6IW+ PdxNFA4nMAKZ0cT+jBGYPINhrJX9eqoryn3YxU/a2AxGLEhkAiKEPXJhKkJoYqpYIC3b C3mEcaPRCcbof5Eb6rM7kyW/QctbaiggK2iK8lp9FmvWRo1miJ4jRP4yDJ6PLJNQOI1N 8zCQ== X-Google-Smtp-Source: AHgI3IYnsiekbeLSFtIgzri2SnnfjeNt2qRN/KWI9yLMZxIuOKs3/2jqj0gP3wC81SLZ/uMG63ce5A== X-Received: by 2002:a17:902:f24:: with SMTP id 33mr13818923ply.65.1551011715029; Sun, 24 Feb 2019 04:35:15 -0800 (PST) Received: from mylaptop.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id v6sm9524634pgb.2.2019.02.24.04.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Feb 2019 04:35:14 -0800 (PST) From: Pingfan Liu To: x86@kernel.org, linux-mm@kvack.org Cc: Pingfan Liu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Vlastimil Babka , Mike Rapoport , Andrew Morton , Mel Gorman , Joonsoo Kim , Andy Lutomirski , Andi Kleen , Petr Tesarik , Michal Hocko , Stephen Rothwell , Jonathan Corbet , Nicholas Piggin , Daniel Vacek , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] x86/numa: build node fallback info after setting up node to cpumask map Date: Sun, 24 Feb 2019 20:34:09 +0800 Message-Id: <1551011649-30103-7-git-send-email-kernelfans@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551011649-30103-1-git-send-email-kernelfans@gmail.com> References: <1551011649-30103-1-git-send-email-kernelfans@gmail.com> 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: X-Virus-Scanned: ClamAV using ClamSMTP After the previous patches, on x86, it is safe to call memblock_build_node_order() after init_cpu_to_node(), which has set up node to cpumask map. So calling memblock_build_node_order() to feed memblock with numa node fall back info. Signed-off-by: Pingfan Liu CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: "H. Peter Anvin" CC: Dave Hansen CC: Vlastimil Babka CC: Mike Rapoport CC: Andrew Morton CC: Mel Gorman CC: Joonsoo Kim CC: Andy Lutomirski CC: Andi Kleen CC: Petr Tesarik CC: Michal Hocko CC: Stephen Rothwell CC: Jonathan Corbet CC: Nicholas Piggin CC: Daniel Vacek CC: linux-kernel@vger.kernel.org --- arch/x86/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 3d872a5..3ec1a6e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1245,6 +1245,8 @@ void __init setup_arch(char **cmdline_p) prefill_possible_map(); init_cpu_to_node(); + /* node to cpumask map is ready */ + memblock_build_node_order(); io_apic_init_mappings();