Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7413322ybi; Mon, 8 Jul 2019 21:27:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUsBa6I2T2Wxq0/tylkRj+HCfySLpDDWnDvsS3RQ73A6EKHsg6XPMXZssT2tRVXah/j7HM X-Received: by 2002:a65:5888:: with SMTP id d8mr27587383pgu.124.1562646461569; Mon, 08 Jul 2019 21:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562646461; cv=none; d=google.com; s=arc-20160816; b=LjJm6NwH73E2r3QTViienh92naFjPi+GhtfcxvHSqaEZYDWXmxSS3Y/KEQtLkYqso7 CJZScReIfNeZwW8flk6ynvCovz7/6Og76tWX4h2SGJNsmI6FQslBJlpTSG13hnMipPTk tC6Z0G8VIrmHI/NLUka811yc5kZE9UdIpS/hL6eDIjvXlr1Lc055tYk4zNZN2L8MJP15 szqEY8OTlxkkHZiFXL9/9ZHrTAVr4yFTY94rJXw0UY1BRMGkLLXqiqSE3ljmBHXWyu8P tAxTa61W7IFE7HIU/e1TwZ8Ipynl3bpkc3wQd656AkYIpY7uFaGoz/8fU2imq4pgqVGH DdCw== 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=BmVuYRL/YC6C6PnxH4vV3jTMGA9VP+9lw/llQAyxkBg=; b=scawCkeamKetx89tKPPQ2RUavnLpDGVVzzdqbCxwSkaqOwMFD6VxzzUysCaT41w6W4 0LHh+Za+TkD6ZVY3eoNgOKIlV9xZ7Lx+Qv2S+MCas1+wjdX7iRS+mnCpCExTZg91pHat VxURpxzXyKsuzb0zKmGmKpI9ZXmQIFb+jEnUK5iQHqfaDqYMYUTWXjy2diif8WdoDRp0 Llrpx/6fW2aLttmj9ShvP6SctPomHYQbrcKw6YoqtFVMUvkAlgOERyoaT7dUnVPn32ys ed7FKjuvE/ZFx8KgUXK2yuKKEzIKultACBVoAXDF8pnZEsLLFDDit4JOZI1dDTT937vt xVFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ew4aZcCm; 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 f18si21281850pfq.169.2019.07.08.21.27.26; Mon, 08 Jul 2019 21:27:41 -0700 (PDT) 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=ew4aZcCm; 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 S1726984AbfGIE0s (ORCPT + 99 others); Tue, 9 Jul 2019 00:26:48 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41087 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfGIE0s (ORCPT ); Tue, 9 Jul 2019 00:26:48 -0400 Received: by mail-io1-f65.google.com with SMTP id j5so20907659ioj.8 for ; Mon, 08 Jul 2019 21:26:48 -0700 (PDT) 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=BmVuYRL/YC6C6PnxH4vV3jTMGA9VP+9lw/llQAyxkBg=; b=ew4aZcCmpjGmFWDW8siF/BrPgX3FR5qAVzERtLgz8rRdcuR3idhlhNSMrgwGku0nx4 xhZiQmKXiYXi7jS2m9xM1FocxBPmMXRNNXK5R2tGHqWhesDAn/25feA+AMh0X/L5Y51/ bVH3VuiR9KQKKF8paUydvu8dtLu5r0QKnyJ3/snjs+jNTLs290JIfQxADm+6cm4uf+aZ 42ETGgoPrvSB8Ai1C75ay+Vq48f46dYveS2qMraSkuPAobgqL2cH6ze/2byQkasTMhbz ug5ekuGqJ3NGRKO0MrsvSyuGs8uaQA7RD2HUTWydE0Hql1bvQbQSt4X3Eb6xkhfpFq5Z hyrQ== 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=BmVuYRL/YC6C6PnxH4vV3jTMGA9VP+9lw/llQAyxkBg=; b=EBraq6xVDoSfeWCq52U241XNp+SN7fDVwuzprhGimuGWgFrMtawNt4Q/dKL2ubJk2R AuPB3KydrdKswxS4+BQr+DgtI2c/ZF5KV/ZyfCGzPbJHuwzLhEY0+6sEvp8Rb4Shy6yS k1T44WxLI1frzZ5cNKAYddLqy5efDrBwQGeLTcZSwKzNVX5NDznlZFAZM3bcjqbCO0pv NWI/RFPkJKKjdS45gY911I1yfUofWGIbvaFLUCwmtY/V1gem0PRw8KtypgmOa6RsBTpL 5LWm+YNSlxlNyoquZocOdyCfzTe4BacqevDk3v8pjCCFwoUVPaLVlAgyvwrrdwe44zjp Kokw== X-Gm-Message-State: APjAAAWaTdAY7zcudiAPuGhpSAwAUXH2FGI2Ppo2ZOfB/l6sobKQowTq PWBLeECuO8UBBosNZN/SmjR2Yc4hFXeEn9RPpg== X-Received: by 2002:a6b:4107:: with SMTP id n7mr342946ioa.12.1562646407823; Mon, 08 Jul 2019 21:26:47 -0700 (PDT) MIME-Version: 1.0 References: <1562300143-11671-1-git-send-email-kernelfans@gmail.com> <1562300143-11671-2-git-send-email-kernelfans@gmail.com> <18D4CC9F-BC2C-4C82-873E-364CD1795EFB@amacapital.net> In-Reply-To: <18D4CC9F-BC2C-4C82-873E-364CD1795EFB@amacapital.net> From: Pingfan Liu Date: Tue, 9 Jul 2019 12:26:36 +0800 Message-ID: Subject: Re: [PATCH 2/2] x86/numa: instance all parsed numa node To: Andy Lutomirski Cc: Thomas Gleixner , x86@kernel.org, Michal Hocko , Dave Hansen , Mike Rapoport , Tony Luck , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Andrew Morton , Vlastimil Babka , Oscar Salvador , Pavel Tatashin , Mel Gorman , Benjamin Herrenschmidt , Michael Ellerman , Stephen Rothwell , Qian Cai , Barret Rhoden , Bjorn Helgaas , David Rientjes , linux-mm@kvack.org, LKML 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 Tue, Jul 9, 2019 at 1:53 AM Andy Lutomirski wrote: > > > > > On Jul 8, 2019, at 3:35 AM, Thomas Gleixner wrote: > > > >> On Mon, 8 Jul 2019, Pingfan Liu wrote: > >>> On Mon, Jul 8, 2019 at 3:44 AM Thomas Gleixner wrote: > >>> > >>>> On Fri, 5 Jul 2019, Pingfan Liu wrote: > >>>> > >>>> I hit a bug on an AMD machine, with kexec -l nr_cpus=4 option. nr_cpus option > >>>> is used to speed up kdump process, so it is not a rare case. > >>> > >>> But fundamentally wrong, really. > >>> > >>> The rest of the CPUs are in a half baken state and any broadcast event, > >>> e.g. MCE or a stray IPI, will result in a undiagnosable crash. > >> Very appreciate if you can pay more word on it? I tried to figure out > >> your point, but fail. > >> > >> For "a half baked state", I think you concern about LAPIC state, and I > >> expand this point like the following: > > > > It's not only the APIC state. It's the state of the CPUs in general. > > > >> For IPI: when capture kernel BSP is up, the rest cpus are still loop > >> inside crash_nmi_callback(), so there is no way to eject new IPI from > >> these cpu. Also we disable_local_APIC(), which effectively prevent the > >> LAPIC from responding to IPI, except NMI/INIT/SIPI, which will not > >> occur in crash case. > > > > Fair enough for the IPI case. > > > >> For MCE, I am not sure whether it can broadcast or not between cpus, > >> but as my understanding, it can not. Then is it a problem? > > > > It can and it does. > > > > That's the whole point why we bring up all CPUs in the 'nosmt' case and > > shut the siblings down again after setting CR4.MCE. Actually that's in fact > > a 'let's hope no MCE hits before that happened' approach, but that's all we > > can do. > > > > If we don't do that then the MCE broadcast can hit a CPU which has some > > firmware initialized state. The result can be a full system lockup, triple > > fault etc. > > > > So when the MCE hits a CPU which is still in the crashed kernel lala state, > > then all hell breaks lose. > > > >> From another view point, is there any difference between nr_cpus=1 and > >> nr_cpus> 1 in crashing case? If stray IPI raises issue to nr_cpus>1, > >> it does for nr_cpus=1. > > > > Anything less than the actual number of present CPUs is problematic except > > you use the 'let's hope nothing happens' approach. We could add an option > > to stop the bringup at the early online state similar to what we do for > > 'nosmt'. > > > > > > How about we change nr_cpus to do that instead so we never have to have this conversation again? Are you interest in implementing this? Thanks, Pingfan