Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp625110imu; Fri, 7 Dec 2018 06:29:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/XWTEJRqpSE9HqM9JzEWUFgV8wNKtSchb5ar3vOICHN7T2dzxyXjJBA0GET3RNCVqv66ZrU X-Received: by 2002:a62:d005:: with SMTP id p5mr2438357pfg.175.1544192974617; Fri, 07 Dec 2018 06:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544192974; cv=none; d=google.com; s=arc-20160816; b=n2L9BiEM3m1iY3m3q/J04u1f8Qj/V1ph3xv4gLCluj3ZcCZVEcnXmxxh1DqQl1/+Qf muujjvU5KaMyAZtUUBkXO1jB1P6VI/g9NH5A0/9BUv4c2THPsaGGGFFbQ2SYo23gb2dT +5XYPo1Jb+SgOwor/meUgaEolifwdGzUev3hoOFE5AEruaeIEaGT8vb17DPHo3nEMN7y 0WPcKkz5dI3BzyFVqsO3+AHdEj0lYdRFkYNnD6Pj5AEhjXPIT0xEXM82gD+8E8YpPHcS WrPlZeVHjwKhMph/TO4cT2KtNLkUXKej5JOHw2tJd55SKcQiPcIUA4XqgYzH4EZaY2C6 0AiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ofi9MX7MEGIvio94AZWeSpB3uNc4Ju5AMyFYF6XQLLE=; b=XMegGjanELgOzOSbjhE5RwceJePJztOhl2kSj2qsyDPjLuTQE3gA42uhllaFUkBCIz 51GDB1RdnosPJZMzC5I/2jQnyPxzeBQLVoPzlV50uq/+UQAm0x38wqA5OzjZ7MQ3yhhY wEjLkUN0ov+lZErdza9SIlsibDVFW36v++IM7HrFXAwmUAS++4btW8n9ZZUY4KoZOswX 8igKUeL6FasjICjQDQN+O3O4VmGLI0kpB1ogAmSXdvQNCJyqVnEh2UgwVqSrOxZbXsCa Eh3T9Gj1wn25RBRtJSO5L5ZYUak9Lnv9F20IuKumDMRh5DyJ7mhhaJOTMPVCqmN2IhXn ZDlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pjRPiBUD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r196si2938127pgr.311.2018.12.07.06.29.18; Fri, 07 Dec 2018 06:29:34 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pjRPiBUD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbeLGO12 (ORCPT + 99 others); Fri, 7 Dec 2018 09:27:28 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:39086 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbeLGO11 (ORCPT ); Fri, 7 Dec 2018 09:27:27 -0500 Received: by mail-ed1-f65.google.com with SMTP id b14so3851113edt.6 for ; Fri, 07 Dec 2018 06:27:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ofi9MX7MEGIvio94AZWeSpB3uNc4Ju5AMyFYF6XQLLE=; b=pjRPiBUDH6btJ+2jriXyJ/VoWq12NHWrroB1KGCa4t2W9JUg/WoZAMOWPp4qk//cMx 4eM+waksPwVMQAnMkhxqkOPNdjK8fYJArQQ418kM3fiOLP/CpmDgRaX0/JbvRYN+1JT0 Bv8ADQHy89Wk0064BNatfaFr25HVH4XXib5eVfUA0iVe6Gd9pKAgEAG0T+7ZRcXtFVVW fq8gjkWEU2SAlfU4QvJJwgwXw3Vg5a8bsOvgmqamAfn6JwaSEyxUVC4WoYOjn5Ndo9bk xi5Uht50muW252uoh6IH6PcwANtrH8+lHzEtXsemB0Du2Qwn+e3VXYXOjd+YFi4DepJH n4Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ofi9MX7MEGIvio94AZWeSpB3uNc4Ju5AMyFYF6XQLLE=; b=TUIp4ErDBqShHFPi6t026yYDqb57ejqOiyRzcPbbaT44qSDVaAOgjJqanmBHYPmjr5 tKnqKXYPP0G27IyKAiXCLrgrm1BQBhkYd2vucwqEVxToXPGZQkGYlpPjpLE7+0bKJLoD ndkQAYNqewf32E4SeD33tIrZ/oosNaQWvFR2mrnMo48lnb+mCr+YP07j458WaGK+MweB nCgtT/7thEpnyXfH6MlRunxeKijC2gmdrbaiktMbA8fy/0WYaAttSsU4sBGdUGwalVpy bsxda4A+Lzeq8s+TsCmgKvf0y6jN6vSwaWIY/tmKuWA3DT1TK5H1/1cSFI1kfbB+3sg5 BF6A== X-Gm-Message-State: AA+aEWZKkeu0Bn5lUtHzflRmD0I0F3LvluS0s/xLskpueHgZEeUOYBI2 61tlBsOOpyOS9IByYKDlRyU654QPSe9L4Lov9cxS9Al3LQ== X-Received: by 2002:a17:906:838e:: with SMTP id p14-v6mr2097518ejx.94.1544192845622; Fri, 07 Dec 2018 06:27:25 -0800 (PST) MIME-Version: 1.0 References: <20181206082806.GB1286@dhcp22.suse.cz> <20181206121152.GH1286@dhcp22.suse.cz> <20181207075322.GS1286@dhcp22.suse.cz> <20181207113044.GB1286@dhcp22.suse.cz> <20181207142240.GC1286@dhcp22.suse.cz> In-Reply-To: <20181207142240.GC1286@dhcp22.suse.cz> From: Pingfan Liu Date: Fri, 7 Dec 2018 22:27:13 +0800 Message-ID: Subject: Re: [PATCH] mm/alloc: fallback to first node if the wanted node offline To: mhocko@kernel.org Cc: Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mike Rapoport , Bjorn Helgaas , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 7, 2018 at 10:22 PM Michal Hocko wrote: > > On Fri 07-12-18 21:20:17, Pingfan Liu wrote: > [...] > > Hi Michal, > > > > As I mentioned in my previous email, I have manually apply the patch, > > and the patch can not work for normal bootup. > > I am sorry, I have misread your previous response. Is there anything > interesting on the serial console by any chance? Nothing. It need more effort to debug. But as I mentioned, enable all of the rest possible node, then it works. Maybe it can give some help for you. diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 1308f54..4dc497d 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -754,18 +754,23 @@ void __init init_cpu_to_node(void) { int cpu; u16 *cpu_to_apicid = early_per_cpu_ptr(x86_cpu_to_apicid); + int node, nr; BUG_ON(cpu_to_apicid == NULL); + nr = cpumask_weight(cpu_possible_mask); + + /* bring up all possible node, since dev->numa_node */ + //should check acpi works for node possible, + for_each_node(node) + if (!node_online(node)) + init_memory_less_node(node); for_each_possible_cpu(cpu) { - int node = numa_cpu_node(cpu); + node = numa_cpu_node(cpu); if (node == NUMA_NO_NODE) continue; - if (!node_online(node)) - init_memory_less_node(node); - numa_set_node(cpu, node); } } Thanks, Pingfan