Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2555077ybt; Tue, 16 Jun 2020 08:57:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywdLbigc69mtGHJ7XA7fF1dFE2NqGd9BISOIyyE809rpvzROy8tw+w5XqAF75J7XG6XCiY X-Received: by 2002:a17:906:118b:: with SMTP id n11mr3478890eja.328.1592323038945; Tue, 16 Jun 2020 08:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592323038; cv=none; d=google.com; s=arc-20160816; b=JPbAV0eHDfBrDp4h9yN9VT5likaMEK3xoyptPngV0BFubAaYoXa6IJ8S7nXwFnD7SZ MWsj+gg/HOVfdc/jcaHgq3sWxfd0kcBDSOEd+YB15GIzF1lzcKgU7KanlAIc/mKSNGwr +NIJaZYo2FrD2Rs7SKUubvu0tWs3baE4t0pljSjDufTQoVWwkcV4R5bSyoKmTBkCys7q DHiRTf1MRgjVppwscEf3W618Lnhf79+0R3qLAw4ng5WWLs9qWXWdBfyFpAQNL7vf2ddZ GBDfFYgQLTPid01XSlEi0JZViEUAxCVIURn909yv9mI4eHaQv7dPvL10BdIfgGGqqJyf dpag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=G95e1hs99HKYz7Z+8lvfiah7jhbjTBJ3fLJ4cN0uIeU=; b=wJMCGfzSe6umnaIZ9ZnHdvjXSPxnC4RffCq2xM1cyMSA5gMvZGS8GWF6G4VTsDRjw/ u62KPCjeQK/GbDfI6/ueDB7Q8SWQvZXpBDQWHIwFvJF0e3Qo8MvjvpWnAiTuFezyFBi/ cEtujCV/pVd5KV/ndzjUOHwnfPlig+OtrpnnFt3nAc5CsXFwWqkkp3yU76xIIwc0N7Tu oXTrXmAY0H/B8cdlbthVUpH6kyUch+j3EEsTYllS2saUBjiAGkRNnAilmHOn6ETSJAUg nj779gfIlOtAHf/kTmztytGBFylfnSd57x7B7AKvQS8l5J7MBNzaea7Mau5r3X5RMiR7 NORA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si10712171ejg.316.2020.06.16.08.56.56; Tue, 16 Jun 2020 08:57:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733058AbgFPPzI convert rfc822-to-8bit (ORCPT + 99 others); Tue, 16 Jun 2020 11:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733047AbgFPPzD (ORCPT ); Tue, 16 Jun 2020 11:55:03 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA81DC061573; Tue, 16 Jun 2020 08:55:03 -0700 (PDT) Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1jlDvR-0001r7-MW; Tue, 16 Jun 2020 17:55:01 +0200 Date: Tue, 16 Jun 2020 17:55:01 +0200 From: Sebastian Andrzej Siewior To: Stephen Berman Cc: Thomas Gleixner , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: power-off delay/hang due to commit 6d25be57 (mainline) Message-ID: <20200616155501.psduxnisltitodme@linutronix.de> References: <87imfyh6yx.fsf@gmx.net> <87wo4dligz.fsf@gmx.net> <20200612110122.jossn5zrktcvpbpm@linutronix.de> <87tuzdrgm5.fsf@gmx.net> <20200614171005.3zy673p6bpwoqnmq@linutronix.de> <874krcsquv.fsf@gmx.net> <20200615145130.bcdidqkp6w23xb6c@linutronix.de> <87tuzbh482.fsf@gmx.net> <20200616073827.vysntufld3ves666@linutronix.de> <87o8pjh1i0.fsf@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <87o8pjh1i0.fsf@gmx.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-16 10:13:27 [+0200], Stephen Berman wrote: > Yes, thanks, that did it. Trace attached. So TZ10 is a temperature sensor of some kind on your motherboard. In your v5.6 dmesg there is: | thermal LNXTHERM:00: registered as thermal_zone0 | ACPI: Thermal Zone [TZ10] (17 C) So. In /sys/class/thermal/thermal_zone0/device/path you should also see TZ10. And /sys/class/thermal/thermal_zone0/temp should show the actual value. This comes from the "thermal" module. Looking at the trace, might query the temperature every second which somehow results in "Dispatching Notify on". I don't understand how it gets from reading of the temperature to the notify part, maybe it is part of the ACPI… However. Could you please make sure that the thermal module is not loaded at system startup? Adding thermal.off=1 to the kernel commandline should do the trick. And you should see thermal control disabled in dmesg. That means your thermal_zone0 with TZ10 does not show up in /sys and nothing should schedule the work-items. This in turn should allow you to shutdown your system without the delay. If this works, could you please try to load the module with tzp=300? If you add this thermal.tzp=300 to the kernel commandline then it should do the trick. You can verify it by cat /sys/module/thermal/parameters/tzp This should change the polling interval from what ACPI says to 30secs. This should ensure that you don't have so many worker waiting. So you should also be able to shutdown the system. > Steve Berman Sebastian