Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3199805ybi; Mon, 29 Jul 2019 02:38:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMnsc+ZPy2mWk1jkn9s58DbWMmP1dIN7ipBZmbPr+mISrK/wymO2SyF3vwylGw2YjdR9oo X-Received: by 2002:a63:903:: with SMTP id 3mr37912444pgj.371.1564393110250; Mon, 29 Jul 2019 02:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564393110; cv=none; d=google.com; s=arc-20160816; b=pQFcf3Br89Zh79a7aLExp/kFgJ7TKaRrtcCghhwp38TuBrxR4WgX/WIC7j8EMqtqDx AKfJllyBBWBVpVgqjIBf4p5nzbQnMpO9wQ00RLM1UtJS3qBf3rXmeUt50msirr5j5Eax /VaZEEzOVN3cRTAfiqCiIxRVcBhj46hNE05eWEgT7g2EdKlEMz38YZsdi2W/jkeIKItf Kyfut58V+3rqGJfhftkkcNUvGU/I19j/TCAfbCQu1ddrWGzFH4rFhO8w5eXai17GamDo g3s6ytVKwcTAi5dk30Jd2MO3stJWQ7jq61OKg255PRPkxb6+TRJDpb+BoukmAVSIy9mk JrnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=holG7IqjUcljSxxM2S+TjFVhu9NMDj7OJSD6E50qkBw=; b=QW7q6dTQWgQFWUQge5Sv7ISAcblR105aakbZ9cXCcoWreg3H16ks7vCinfGtJ6ThP9 AFP1TnqxS7diWunMeDECwRk0qkZ11eWJ/3Tyq+JlQcZ6nlJNeOCqYpszhuzqOPFdwp8A zKrsAd5Ai1elCxK+mlJfDpxxdk668RCt82DyKBgKZbg8OxHWhaCxn5WClkhUYGQGjvO+ 65kj69bDzse+WB2MwEDV6xtv/uBXYcoq51Z4p7kNo206nDir2omeWAFOjtcnlNTT5D+/ IHb/5f/sZZZTmBdEy5yx6QmUgWi6dY27GB6sLO6o2Yzt/pzSE7GAcQqyus0/XrmrZH5u Mzfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p4MttR64; 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 u128si21248633pgu.389.2019.07.29.02.38.15; Mon, 29 Jul 2019 02:38:30 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p4MttR64; 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 S1728045AbfG2Jf5 (ORCPT + 99 others); Mon, 29 Jul 2019 05:35:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58048 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbfG2Jfz (ORCPT ); Mon, 29 Jul 2019 05:35:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=holG7IqjUcljSxxM2S+TjFVhu9NMDj7OJSD6E50qkBw=; b=p4MttR64uYFYXHxpz9W79sCUF qnikm0he/3QDFLQXnTsQV83E5+fyf4+okJkFCz/8gDPTJfSZ9Xz5JJVafoKp5epLnXIgEF0kfThQq z0WzQ0IfYyOEV54kONRU7IiEHHAeImPDMqaj4+PBjUZFET8FSv2psE7ijM/n1cnopDWZkmwGjsVtE xeUG+VpuDQgwZLzQy+GLDf6SdBFRa7a/cWAefHnxRMC8/XHA/KlEykbBf/hHCpa1rEyRhySR7VLa8 S91u7xAyPONTnFsuXX+T4WMVf/KnhcIuBqtkOyZzJR3Xc6ZqvHbb/rTogfMzPbJGGQUDinu9fg6gE 0kyXRipCg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hs24J-0006kt-BL; Mon, 29 Jul 2019 09:35:47 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9943C20227071; Mon, 29 Jul 2019 11:35:45 +0200 (CEST) Date: Mon, 29 Jul 2019 11:35:45 +0200 From: Peter Zijlstra To: Guenter Roeck Cc: x86@kernel.org, Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, Borislav Petkov Subject: Re: sched: Unexpected reschedule of offline CPU#2! Message-ID: <20190729093545.GV31381@hirez.programming.kicks-ass.net> References: <20190727164450.GA11726@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190727164450.GA11726@roeck-us.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 27, 2019 at 09:44:50AM -0700, Guenter Roeck wrote: > Hi, > > I see the following traceback (or similar tracebacks) once in a while > during my boot tests. In this specific case it is with mainline > (v5.3-rc1-195-g3ea54d9b0d65), but I have seen it with other branches > as well. This isn't a new problem; I have seen it for quite some time. > There is no specific action required to make it appear; just running > reboot loops is sufficient. The problem doesn't happen a lot; > non-scientifically I would say I see it maybe once every few hundred > boots. > > No specific action requested or asked for; this is just informational. > > A complete log is at: > https://kerneltests.org/builders/qemu-x86-master/builds/1285/steps/qemubuildcommand/logs/stdio > > Guenter > > --- > [ 61.248329] sd 0:0:0:0: [sda] Synchronizing SCSI cache > [ 61.268277] e1000e: EEE TX LPI TIMER: 00000000 > [ 61.311435] reboot: Restarting system > [ 61.312321] reboot: machine restart > [ 61.342193] ------------[ cut here ]------------ > [ 61.342660] sched: Unexpected reschedule of offline CPU#2! > ILLOPC: ce241f83: 0f 0b > [ 61.344323] WARNING: CPU: 1 PID: 15 at arch/x86/kernel/smp.c:126 native_smp_send_reschedule+0x33/0x40 > [ 61.344836] Modules linked in: > [ 61.345694] CPU: 1 PID: 15 Comm: ksoftirqd/1 Not tainted 5.3.0-rc1+ #1 > [ 61.345998] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 > [ 61.346569] EIP: native_smp_send_reschedule+0x33/0x40 > [ 61.347099] Code: cf 73 1c 8b 15 60 54 2b cf 8b 4a 18 ba fd 00 00 00 e8 05 65 c7 00 c9 c3 8d b4 26 00 00 00 00 50 68 04 ca 1a cf e8 fe e3 01 00 <0f> 0b 58 5a c9 c3 8d b4 26 00 00 00 00 55 89 e5 56 53 83 ec 0c 65 > [ 61.347726] EAX: 0000002e EBX: 00000002 ECX: 00000000 EDX: cdd64140 > [ 61.347977] ESI: 00000002 EDI: 00000000 EBP: cdd73c88 ESP: cdd73c80 > [ 61.348234] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00000096 > [ 61.348514] CR0: 80050033 CR2: b7ee7048 CR3: 0c28f000 CR4: 000006d0 > [ 61.348866] Call Trace: > [ 61.349392] kick_ilb+0x90/0xa0 > [ 61.349629] trigger_load_balance+0xf0/0x5c0 > [ 61.349859] ? check_preempt_wakeup+0x1b0/0x1b0 > [ 61.350057] scheduler_tick+0xa7/0xd0 kick_ilb() iterates nohz.idle_cpus_mask to find itself an idle_cpu(). idle_cpus_mask() is set from nohz_balance_enter_idle() and cleared from nohz_balance_exit_idle(). nohz_balance_enter_idle() is called from __tick_nohz_idle_stop_tick() when entering nohz idle, this includes the cpu_is_offline() clause of the idle loop. However, when offline, cpu_active() should also be false, and this function should no-op. Then we have nohz_balance_exit_idle() from sched_cpu_dying(), which should explicitly clear the CPU from the mask when going offline. So I'm not immediately seeing how we can select an offline CPU to kick.