Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7508381ybi; Mon, 8 Jul 2019 23:21:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOStbn2WqtOHWnDtM8Y+2m1CSJwVH4gLorhx6ZgO52rn13R2rs/PBxJ5e8QUF9n0ls9oGf X-Received: by 2002:a17:90a:206a:: with SMTP id n97mr30837980pjc.10.1562653281012; Mon, 08 Jul 2019 23:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562653281; cv=none; d=google.com; s=arc-20160816; b=Du0p1h5UdGjBxyUFrNOjRdistaWOIPslhIr/Ai/PNqJVBrSSXyUZaubQMsDX8Y8LoL XcJlMBGmcJ36FBn/ik/Ny9bIdRlr6eREWASyQi4kAuDagfK5mVZtGOku2qMMUoCNrZCL QlQBYEmQY4p9B5OjI/EJNiCAf4Uk0jtrQz3+4gE/em/toO90POZaCWwAoX9h/0RczXhy hOT0c5gjqD1ZuU+8W/4f4orRs71EbsdO3AYfCgoGjNd/aNeqWxd5XBJRv2GatT17sZii 6v0DPcPsHnjO4mXSz2ivabw8gFGrb06n6Ad01VT1CX/2ILXYYY9VXtG6/miSCM6sDW34 5GlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=8E/LqoH0NMN0NgYnPC0/b0gGlc0kB/9DOFHtO1BjqZQ=; b=Qdx9LbyhoLklj/mLxodIdC/kCQCWq50Ghs3VOleqioLzApX8Jc9f3fatbl9ivV8Hvr fCHMbZZv3Lw7X/Ox3awFsKwSlCH21qjF3MusB97sWjVeG8U6tTOgjOh116wtqSYMqQMQ gbyL75f1TJWbzNkK8nFzF8Lu29a3BwHs/2uN4nbt9ebsIptPvVKkiySbvNIYVU5Q8ITx J8E5W23l07d98uiN7YhkQXd2nkF2YFWiUisR/PSCjXGaY93cIOeLCVH1X+2P5z3q436G cQsnSQ5pEDZYEnlg677CBD5G6q1EwufTKJb5tYIv+kSu1qMaN6LxKGtlCErZP0gCVR7s 1ZEA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si21721987pfa.81.2019.07.08.23.21.05; Mon, 08 Jul 2019 23:21:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726241AbfGIGNn (ORCPT + 99 others); Tue, 9 Jul 2019 02:13:43 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:43975 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbfGIGNn (ORCPT ); Tue, 9 Jul 2019 02:13:43 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hkjN1-0008I9-T5; Tue, 09 Jul 2019 08:12:56 +0200 Date: Tue, 9 Jul 2019 08:12:54 +0200 (CEST) From: Thomas Gleixner To: Pingfan Liu cc: 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 Subject: Re: [PATCH 2/2] x86/numa: instance all parsed numa node In-Reply-To: Message-ID: References: <1562300143-11671-1-git-send-email-kernelfans@gmail.com> <1562300143-11671-2-git-send-email-kernelfans@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 9 Jul 2019, Pingfan Liu wrote: > On Mon, Jul 8, 2019 at 5:35 PM Thomas Gleixner wrote: > > 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. > Thank you for the comprehensive explain. With your guide, now, I have > a full understanding of the issue. > > But when I tried to add something to enable CR4.MCE in > crash_nmi_callback(), I realized that it is undo-able in some case (if > crashed, we will not ask an offline smt cpu to online), also it is > needless. "kexec -l/-p" takes the advantage of the cpu state in the > first kernel, where all logical cpu has CR4.MCE=1. > > So kexec is exempt from this bug if the first kernel already do it. No. If the MCE broadcast is handled by a CPU which is stuck in the old kernel stop loop, then it will execute on the old kernel and eventually run into the memory corruption which crashed the old one. Thanks, tglx