Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5387783imu; Tue, 13 Nov 2018 05:55:39 -0800 (PST) X-Google-Smtp-Source: AJdET5f7gLMAvaBFeYdyZt8P5sTaVwo3KwkyJZ/FLFutUkPFHIk5Zx4X9pmU8kIQNfTW0Wzu68PU X-Received: by 2002:a17:902:166:: with SMTP id 93-v6mr5099777plb.68.1542117339015; Tue, 13 Nov 2018 05:55:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542117338; cv=none; d=google.com; s=arc-20160816; b=GidrV8diXFz6AX9whF1rQKmnLWX1OiezyiRImx1RHJSeQ+GxEHSfatTOF3dNn2++t+ r6Mb9chr7PeWlh2OtjKQLNKhGwir482ZmothNiWq+1eK8CFrADPDH2sAG1HeET9r20PZ 183VKZ+Q8w6Pq9WJj0TBNl+V/QdX8cAb2a7a09YLrZnT08UgJYlQPPD3QM9juOv1aRrn TtwHmHXlFvfO4x93Rq9mL+37FND3AYOey9k0I5dTh8vOfvC8dXxb0bx/vke7kAUTTXhs 6A4wA8bRkmVreSAgwqlZRS7h5H9jubEAd1j6xOGS1sRWDOibmbePHSZVEfTYfG5SOR9V pqKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date; bh=z82Cw2Yy52IpV6/cS+Hn7IEDiHI5d66+Yc5yjvyYj+k=; b=Hm+VodbPn0UakeP0Nj4Kf709MPN4vVggIl39+vAEjv8FEsHiLDjArbi+L6c7UQaV3h Ru1pHhx8avjjPvKRZn9iSU1QiTjpBWRXNNhnCt/mZNqyRdnmgqSVu5e/UE5JGsmzt/S8 izG756CtIkWzF9Yp/suw564BqOOM9Jsb4YFAKSehQiqkkoxyMX/nvKUGR5g9CIiH+Fgs JouIdcIWI+57wU+DDBjTNJdGsdrgLo4zCXJofFmhvMjfpvUGNuayh+F/qgj2rhj3el/y 3HPG/RtZZcNT1JECBI5rlV8dkchgVFC2WnRnKRb2ADp2CDH/lxKGZFShKAdeM8Y3eZ9G /8pQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si18371973pfe.44.2018.11.13.05.55.22; Tue, 13 Nov 2018 05:55:38 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733303AbeKMXxM (ORCPT + 99 others); Tue, 13 Nov 2018 18:53:12 -0500 Received: from mga01.intel.com ([192.55.52.88]:31500 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732913AbeKMXxM (ORCPT ); Tue, 13 Nov 2018 18:53:12 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 05:54:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,499,1534834800"; d="scan'208";a="103991208" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga002.fm.intel.com with SMTP; 13 Nov 2018 05:54:53 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 13 Nov 2018 15:54:53 +0200 Date: Tue, 13 Nov 2018 15:54:53 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, Andi Kleen , "Rafael J. Wysocki" , Viresh Kumar , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Subject: [REGRESSION 4.20-rc1] 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds") Message-ID: <20181113135453.GW9144@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Hi Paul, After 4.20-rc1 some of my 32bit UP machines no longer reboot/shutdown. I bisected this down to commit 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds"). I traced the hang into -> cpufreq_suspend() -> cpufreq_stop_governor() -> cpufreq_dbs_governor_stop() -> gov_clear_update_util() -> synchronize_sched() -> synchronize_rcu() Only PREEMPT=y is affected for obvious reasons, but that couldn't explain why the same UP kernel booted on an SMP machine worked fine. Eventually I realized that the difference between working and non-working machine was IOAPIC vs. PIC. With initcall_debug I saw that we mask everything in the PIC before cpufreq is shut down, and came up with the following fix: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7aa3dcad2175..f88bf3c77fc0 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2605,4 +2605,4 @@ static int __init cpufreq_core_init(void) return 0; } module_param(off, int, 0444); -core_initcall(cpufreq_core_init); +late_initcall(cpufreq_core_init); Here's the resulting change in inutcall_debug: pci 0000:00:00.1: shutdown hub 4-0:1.0: hub_ext_port_status failed (err = -110) agpgart-intel 0000:00:00.0: shutdown + PM: Calling cpufreq_suspend+0x0/0x100 PM: Calling mce_syscore_shutdown+0x0/0x10 PM: Calling i8259A_shutdown+0x0/0x10 - PM: Calling cpufreq_suspend+0x0/0x100 + reboot: Restarting system + reboot: machine restart I didn't really look into what other ramifications the cpufreq initcall change might have. cpufreq_global_kobject worries me a bit. Maybe that one has to remain in core_initcall() and we could just move the suspend to late_initcall()? Anyways, I figured I'd leave this for someone more familiar with the code to figure out ;) -- Ville Syrj?l? Intel