Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2727219ybt; Tue, 16 Jun 2020 13:31:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvEx93Q1S1fHoQ4mt8NRL3IKOZrqFwH9X/zq9n+rGR7HPEvg0uYR+UymD8/DtRq4Iwv3xb X-Received: by 2002:a17:906:3952:: with SMTP id g18mr4711934eje.68.1592339495130; Tue, 16 Jun 2020 13:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592339495; cv=none; d=google.com; s=arc-20160816; b=qKs1nm+zzSO44npjJJxaLF3XWBHYtX9ViA7urjmpuO9eQ54Y4wnJ53hSTJru4X853i vtvfeQOueWwcw37BwsCiRfy4Z9t2Ukgx1R4vu7s00mBZLuy7DXwcLTq5jKJz0Mpl3p7K EwseZTzzlpFdruJTUg5IqXtiPF91T0VA9Fe33vWYifMsrB5NQw7ebkpgVuLrT2mjeFUt 5vUpRpg6DVufmtRwU8is3fOSyB7rF31MwwARmoOSYUhr3C3AKS2q5jQbyscP5iV6WSzO roqSUvy+zpgiydgKTdT6A4r8ATCxMfJo9QgXkYc0qe5Jk/1S5ZSWyecZSalo5Tk+wKEU ZVEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=MewaWFhoclKSZk+KdmzrQtb6WVvTl5LHE3KP8Oh8/OE=; b=ZgyUP+Ii55lzlonfSmTQwfcO3ZsNoipsisSan/QuVHC+szO2bjhQfzy12Fbz9E2Uuk JnEChbzRF+ZXP/4I3mzl8tNHT2RaeZ9v27fun/xglg87tVAOTdrwxeDVet8AVlPtzRv1 iTd3LeOarsc0+KMYQMF977HJTpZUCocAUHvqNMKd8RJgIWLfkN5QKP29dbOGK8LjUGfn X+QtVnY0yHStFBMuQN0dPdIsWap2guee3FDorEB090d/jUgiHhxKa45C0yo/j2cx5jOr NSz90WcrLnFiyrl2xY9VRnSmNqk9A128WcCISblu8ZF8VtoEf7jRu28hp+wkObRSaaXC +ydA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=is2mj2dK; 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 dm17si10758597edb.312.2020.06.16.13.30.49; Tue, 16 Jun 2020 13:31:35 -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; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=is2mj2dK; 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 S1731751AbgFPU3D (ORCPT + 99 others); Tue, 16 Jun 2020 16:29:03 -0400 Received: from mout.gmx.net ([212.227.15.19]:41521 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbgFPU3B (ORCPT ); Tue, 16 Jun 2020 16:29:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592339324; bh=2pcxNtxOxco1guBLo7NG7YQuecY/6crnNcCqmrQnqaA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=is2mj2dKu2pRc4DqNsDqgneXvL121xcu8x0wDhL7ns2TsnwhEixZ6yx3i1SnndQU3 SCWe2KKK+9UCHY2p/v9fYgf5yqEZaykYPF8vQOPNGu2AvWJ2AyIAXjAz35M2SrrYu5 Z8CXllhNz/AvXvy0i6zEvqmMPKb2cOUlwM2uLsJ0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-jhalfs ([92.73.64.60]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQ5vW-1jYB9o2TSa-00M33E; Tue, 16 Jun 2020 22:28:44 +0200 From: Stephen Berman To: Sebastian Andrzej Siewior 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) 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> <20200616155501.psduxnisltitodme@linutronix.de> Date: Tue, 16 Jun 2020 22:28:43 +0200 In-Reply-To: <20200616155501.psduxnisltitodme@linutronix.de> (Sebastian Andrzej Siewior's message of "Tue, 16 Jun 2020 17:55:01 +0200") Message-ID: <871rmesqkk.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:v6O2Oj6vpVD5HT5VMTCK58R+4ZYiC3+dCwrh+F5Wwhd8XCqu3ju sqArwwZb/HmbbXxk71EPzIX1DEtN0O4GEKux7YstO9rlXITe/SI+Ap1XBveZEMuRsFrvZkE 0tjUWXgudC+UBletGoJZhfZlkYuT0K8ZtIl6qycWHN7YcT4wTLN0OniUOsIZitUHoPPzwiU /XI4EM0HhdEwURd21ZUow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lldolxazXTI=:j4K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7cL6ys3WJFsqrwccAoopTrY1YohwTsWUvGROKdC VRwLpSoUCgUS+E8jbwNTCkvdPv5ZqLeExlGSPIQxuBnWNenfR9texwUcZfz6fOzCNdVDQkZjc Uf9irkcs5RU8Tpy31x12oMRGZevzAefnu7NHDO0AQSMtzKsefDrU3le0HM00Sm0VJir5tcJpd HGcJp3csuQPSkllPi Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Jun 2020 17:55:01 +0200 Sebastian Andrzej Siewior wrote: > 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. Yes, TZ10 was in the thermal_zone0/device/path and the value in thermal_zone0/temp was 16800. > 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=E2=80=A6 > > However. Could you please make sure that the thermal module is not > loaded at system startup? Adding > thermal.off=3D1 > > to the kernel commandline should do the trick. And you should see > thermal control disabled > > in dmesg.=20 Confirmed. And the value in thermal_zone0/temp was now 33000. > 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. It did! > If this works, could you please try to load the module with tzp=3D300? > If you add this > thermal.tzp=3D300 >=20=20=20 > to the kernel commandline then it should do the trick. You can verify it > by > cat /sys/module/thermal/parameters/tzp=20 > > 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. Your assessment and predictions are right on the mark! I'm fine with the thermal.tzp=3D300 workaround, but it would be good to find out why this problem started with commit 6d25be57, if my git bisection was correct, or if it wasn't, then at least somewhere between 5.1.0 and 5.2.0. Or can you already deduce why? If not, I'd be more than happy to continue applying any patches or trying any suggestions you have, if you want to continue debugging this issue. In any case, thanks for pursuing it to this point. Steve Berman