Bug 208877 - power-off delay/hang related to ACPI thermal zone polling
Summary: power-off delay/hang related to ACPI thermal zone polling
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Off (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-11 17:21 UTC by Stephen Berman
Modified: 2021-01-25 16:46 UTC (History)
2 users (show)

See Also:
Kernel Version: v5.1 starting with commit 6d25be57
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
dmidecode output (25.55 KB, text/plain)
2021-01-24 14:03 UTC, Stephen Berman
Details

Description Stephen Berman 2020-08-11 17:21:01 UTC
I'm experiencing a delay or hang in powering off my computer after `shutdown -h now' and I've bisected it to this commit in the mainline tree:

commit 6d25be5782e482eb93e3de0c94d0a517879377d0
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Wed Mar 13 17:55:48 2019 +0100

    sched/core, workqueues: Distangle worker accounting from rq lock

I'm filing this bug report at the request of Sebastian Andrzej Siewior, with whom I've had an exchange on the kernel mailing list about this issue, which points to ACPI induced polling of the thermal zone causing a buildup of workers, resulting in the hang/delay; see the thread beginning at https://lore.kernel.org/lkml/87bln7ves7.fsf@gmx.net/ for details.  A workaround to avoid the power-off delay is to add 'thermal.tzp=300' to the kernal command line on booting.
Comment 1 Zhang Rui 2021-01-03 13:45:06 UTC
it is in Rafael' todo list AFAIK.
Comment 2 Rafael J. Wysocki 2021-01-14 16:06:02 UTC
@Stephen: Can you please add some system information (the machine model, manufacturer etc.) here?
Comment 3 Stephen Berman 2021-01-24 14:03:04 UTC
Created attachment 294827 [details]
dmidecode output
Comment 4 Stephen Berman 2021-01-24 14:07:29 UTC
(In reply to Stephen Berman from comment #3)
> Created attachment 294827 [details]
> dmidecode output

I've already confirmed in
https://lore.kernel.org/lkml/87y2gi78sg.fsf@gmx.net/T/#t that the latest
patch fixes the bug, but in case it's useful for the bugtracker, I've attached the output of dmidecode with the requested info.  Here's the tl;dr:

BIOS Information
	Vendor: American Megatrends Inc.
	Version: F5
	Release Date: 03/14/2019
System Information
	Manufacturer: Gigabyte Technology Co., Ltd.
	Product Name: Z390 M GAMING
Processor Information
	Socket Designation: U3E1
	Type: Central Processor
	Family: Core i7
	Manufacturer: Intel(R) Corporation
	ID: EA 06 09 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 158, Stepping 10
Comment 5 Rafael J. Wysocki 2021-01-25 16:46:11 UTC
The patch is available at

https://patchwork.kernel.org/project/linux-acpi/patch/3391226.KRKnzuvfpg@kreacher/

Note You need to log in before you can comment on or make changes to this bug.