Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp747247ybl; Fri, 16 Aug 2019 03:24:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTZj98ruW8TtxQ6T8ZJWHIDAwRdUuDV2JYcL4B2VQf15w+Blz9sFVhZF+VO+dV9l6hW+Cu X-Received: by 2002:a17:902:b48c:: with SMTP id y12mr8476415plr.202.1565951058281; Fri, 16 Aug 2019 03:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565951058; cv=none; d=google.com; s=arc-20160816; b=XShngxGLkfbhDqYZFqcctjSQ1EaFqIC+xAxvflPb35Z2F7+SGP66iaZBBoF3Z15G4y t/roTC3eBv7dpiShesfTQ0afBBZj7rsCUbeH9Pro991y4Whq9iT0TyAh49IuFLB9F219 a5DfSr814SKQiQbMO+5BmzxvgkFQ+SOX0gVxMqlSjOWDsxWyJKDzgm25YAWFBmyAXJzK dmWTfR9ccS0gwW1KIUV3zhKOTRm+kQRLv9+bAO19ksBkMQr28vyeAhdMlPtKifdARAoc uTaUmql/xdqJFextQM2Jbtod2ES0SXCkor8yH028EjVhV4PolcaXYHP/ZvNJ31HrlikX Eetw== 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=6Z1JXDlYuBICuDWnjsZit5lBTbp+jeLB2i8GWvE6tWI=; b=HBPJ588K1sVywuVFL9B27fhbThfdar/A3A+ATxkN6TsBgydgYrunWn2HYfEQCWdvfz QnOBTxDWCxRa7EI3WikkAW3Iw57L+eQARJAmfRnx/UsPYy1FzbbUxToV+6Fm2quckZGs jzFoyKNLnX7mBobJ++meZFaZPgcNjMp5tm2/DOc05ssnina3Q75FX+KccTKaGmIK0Lni Z3xzNAYVqWI0HF8fktO9wbJFqZFHQwKYOl3/+fRfL3gNIQtUos9DVqPoRKckhURxBXA/ mX/cd0jKXGfWqlsNtiPTQuA5ByINI6J+7oMGsEKhXm28TylYEaQ1NXyBrYXZq736SHKL ruUg== 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 m15si4101459pfh.183.2019.08.16.03.24.00; Fri, 16 Aug 2019 03:24:18 -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 S1727128AbfHPKWb (ORCPT + 99 others); Fri, 16 Aug 2019 06:22:31 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:41959 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbfHPKWb (ORCPT ); Fri, 16 Aug 2019 06:22:31 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hyZNH-0007c8-3V; Fri, 16 Aug 2019 12:22:23 +0200 Date: Fri, 16 Aug 2019 12:22:22 +0200 (CEST) From: Thomas Gleixner To: Guenter Roeck cc: Peter Zijlstra , x86@kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org, Borislav Petkov Subject: Re: sched: Unexpected reschedule of offline CPU#2! In-Reply-To: <20190729205059.GA1127@roeck-us.net> Message-ID: References: <20190727164450.GA11726@roeck-us.net> <20190729093545.GV31381@hirez.programming.kicks-ass.net> <20190729101349.GX31381@hirez.programming.kicks-ass.net> <20190729104745.GA31398@hirez.programming.kicks-ass.net> <20190729205059.GA1127@roeck-us.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Jul 2019, Guenter Roeck wrote: > On Mon, Jul 29, 2019 at 12:47:45PM +0200, Peter Zijlstra wrote: > > On Mon, Jul 29, 2019 at 12:38:30PM +0200, Thomas Gleixner wrote: > > > Reboot has two modes: > > > > > > - Regular reboot initiated from user space > > > > > > - Panic reboot > > > > > > For the regular reboot we can make it go through proper hotplug, > > > > That seems sensible. > > > > > for the panic case not so much. > > > > It's panic, shit has already hit fan, one or two more pieces shouldn't > > something anybody cares about. > > > > Some more digging shows that this happens a lot with Google GCE intances, > typically after a panic. The problem with that, if I understand correctly, > is that it may prevent coredumps from being written. So, while of course > the panic is what needs to be fixed, it is still quite annoying, and it > would help if this can be fixed for panic handling as well. > > How about the patch suggested by Hillf Danton ? Would that help for the > panic case ? I have no idea how that patch looks like, but the quick hack is below. Thanks, tglx 8<--------------- diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 75fea0d48c0e..625627b1457c 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -601,6 +601,7 @@ void stop_this_cpu(void *dummy) /* * Remove this CPU: */ + set_cpu_active(smp_processor_id(), false); set_cpu_online(smp_processor_id(), false); disable_local_APIC(); mcheck_cpu_clear(this_cpu_ptr(&cpu_info));