Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4224337pxv; Tue, 27 Jul 2021 01:49:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0NLkOtctBZQTASEInah2Euc92y0hMct+7/dOwn93wlNo66Ge/y5OGugWfu1EGJpc7HGFU X-Received: by 2002:a17:907:7895:: with SMTP id ku21mr7443718ejc.265.1627375790785; Tue, 27 Jul 2021 01:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627375790; cv=none; d=google.com; s=arc-20160816; b=nyjiX1fdLYu+KDBRuuOZcpPmlmkWVc5KHeLMpBpFEq+Vfzo1j9Abx9HUWDhgjmDWzM M+Vq5/9ATGOaLdMdo0jjY4FR4ofCog/k0elaf/raSLqYRQSg0ABRTuNsFbeQUhbh7XR+ SwsAGT4sQ7zU2mVs/M/gcchq+kVKq4AHWcnqss4gtHcxwZmwS7efivVKPXZC/y4Blho9 9gsywnQptN8L5F5QkH3pkps/1ROHrMs/PAeg5X8vAKr77bT/suR3Gudh6Hu+70y/kCuC moLMbcmQVCE6Ig1c8OdhiTtf2vHuoV9d0Pd1vBYP1teDicdLcPsWlML/uBH/WOyvY+Wr oOjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yIZQvAWvv48lJIhiJYr+xTy7vjc6bjxE6LiVCDpnC5I=; b=Xi4Y5ClgvWrvuGYyAxAxKFSb3LdDx5j9q7gBnGyaKHGIoSkMbgOe4X7eGeXO3MgsKv g3ZJPu/rhCyzR6a8XwCrWiPGKCfeH3t8TMQbUE8lXP6WQzpimsRDnls0fcPM6YcDc80p 5SaYnzmwi3GJpoHwu0pVjJCwx9xZJeaFLW+KxIisJ/8jQxugY+oiWxoePzrvKAeFeBl+ tDQiN1qZpvCFvOx2ZfweqlJLqlHzN/WzKy7M7SVaZmK7N87DrITWhKtARpXcs/ssLI8r DpDyhGZBU7klO/+H3ztGVEkgoMmdnb/wCSum78iBlDkmnbx8Qzt2lcl4MY/oVGv1d3dl CN2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si2139735edq.454.2021.07.27.01.49.27; Tue, 27 Jul 2021 01:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235981AbhG0Iqz (ORCPT + 99 others); Tue, 27 Jul 2021 04:46:55 -0400 Received: from goliath.siemens.de ([192.35.17.28]:49805 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235919AbhG0Iqz (ORCPT ); Tue, 27 Jul 2021 04:46:55 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 16R8k8QQ007948 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Jul 2021 10:46:09 +0200 Received: from [167.87.33.191] ([167.87.33.191]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 16R8k6jj011473; Tue, 27 Jul 2021 10:46:07 +0200 Subject: Re: sched: Unexpected reschedule of offline CPU#2! To: Henning Schild , Thomas Gleixner Cc: Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Borislav Petkov , Guenter Roeck , xenomai@xenomai.org 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> <20190816193208.GA29478@roeck-us.net> <20210727100018.19d61165@md1za8fc.ad001.siemens.net> From: Jan Kiszka Message-ID: <745f219e-1593-4fbd-fa7f-1719ef6f444d@siemens.com> Date: Tue, 27 Jul 2021 10:46:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210727100018.19d61165@md1za8fc.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Henning, don't top-post ;)] On 27.07.21 10:00, Henning Schild via Xenomai wrote: > Was this ever resolved and if so can someone please point me to the > patches? I started digging a bit but could not yet find how that > continued. > > I am seeing similar or maybe the same problem on 4.19.192 with the > ipipe patch from the xenomai project applied. > Before blaming the usual suspects, I have a general ordering question on mainline below. > regards, > Henning > > Am Sat, 17 Aug 2019 22:21:48 +0200 > schrieb Thomas Gleixner : > >> On Fri, 16 Aug 2019, Guenter Roeck wrote: >>> On Fri, Aug 16, 2019 at 12:22:22PM +0200, Thomas Gleixner wrote: >>>> 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)); >>>> >>> No luck. The problem is still seen with this patch applied on top of >>> the mainline kernel (commit a69e90512d9def6). >> >> Yeah, was a bit too naive .... >> >> We actually need to do the full cpuhotplug dance for a regular >> reboot. In the panic case, there is nothing we can do about. I'll >> have a look tomorrow. >> What is supposed to prevent the following in mainline: CPU 0 CPU 1 CPU 2 native_stop_other_cpus send_IPI_allbutself ... sysvec_reboot stop_this_cpu set_cpu_online(false) native_smp_send_reschedule(1) if (cpu_is_offline(1)) ... Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux