Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2d28566 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power management updates from Rafael Wysocki:
 "These update the cpuidle poll state definition to reduce excessive
  energy usage related to it, add new CPU ID to the RAPL power capping
  driver, update the ACPI system suspend code to handle some special
  cases better, extend the PM core's device links code slightly, add new
  sysfs attribute for better suspend-to-idle diagnostics and easier
  hibernation handling, update power management tools and clean up
  cpufreq quite a bit.

  Specifics:

   - Modify the cpuidle poll state implementation to prevent CPUs from
     staying in the loop in there for excessive times (Rafael Wysocki).

   - Add Intel Cannon Lake chips support to the RAPL power capping
     driver (Joe Konno).

   - Add reference counting to the device links handling code in the PM
     core (Lukas Wunner).

   - Avoid reconfiguring GPEs on suspend-to-idle in the ACPI system
     suspend code (Rafael Wysocki).

   - Allow devices to be put into deeper low-power states via ACPI if
     both _SxD and _SxW are missing (Daniel Drake).

   - Reorganize the core ACPI suspend-to-idle wakeup code to avoid a
     keyboard wakeup issue on Asus UX331UA (Chris Chiu).

   - Prevent the PCMCIA library code from aborting suspend-to-idle due
     to noirq suspend failures resulting from incorrect assumptions
     (Rafael Wysocki).

   - Add coupled cpuidle supprt to the Exynos3250 platform (Marek
     Szyprowski).

   - Add new sysfs file to make it easier to specify the image storage
     location during hibernation (Mario Limonciello).

   - Add sysfs files for collecting suspend-to-idle usage and time
     statistics for CPU idle states (Rafael Wysocki).

   - Update the pm-graph utilities (Todd Brandt).

   - Reduce the kernel log noise related to reporting Low-power Idle
     constraings by the ACPI system suspend code (Rafael Wysocki).

   - Make it easier to distinguish dedicated wakeup IRQs in the
     /proc/interrupts output (Tony Lindgren).

   - Add the frequency table validation in cpufreq to the core and drop
     it from a number of cpufreq drivers (Viresh Kumar).

   - Drop "cooling-{min|max}-level" for CPU nodes from a couple of DT
     bindings (Viresh Kumar).

   - Clean up the CPU online error code path in the cpufreq core (Viresh
     Kumar).

   - Fix assorted issues in the SCPI, CPPC, mediatek and tegra186
     cpufreq drivers (Arnd Bergmann, Chunyu Hu, George Cherian, Viresh
     Kumar).

   - Drop memory allocation error messages from a few places in cpufreq
     and cpuildle drivers (Markus Elfring)"

* tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits)
  ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA
  cpufreq: CPPC: Use transition_delay_us depending transition_latency
  PM / hibernate: Change message when writing to /sys/power/resume
  PM / hibernate: Make passing hibernate offsets more friendly
  cpuidle: poll_state: Avoid invoking local_clock() too often
  PM: cpuidle/suspend: Add s2idle usage and time state attributes
  cpuidle: Enable coupled cpuidle support on Exynos3250 platform
  cpuidle: poll_state: Add time limit to poll_idle()
  cpufreq: tegra186: Don't validate the frequency table twice
  cpufreq: speedstep: Don't validate the frequency table twice
  cpufreq: sparc: Don't validate the frequency table twice
  cpufreq: sh: Don't validate the frequency table twice
  cpufreq: sfi: Don't validate the frequency table twice
  cpufreq: scpi: Don't validate the frequency table twice
  cpufreq: sc520: Don't validate the frequency table twice
  cpufreq: s3c24xx: Don't validate the frequency table twice
  cpufreq: qoirq: Don't validate the frequency table twice
  cpufreq: pxa: Don't validate the frequency table twice
  cpufreq: ppc_cbe: Don't validate the frequency table twice
  cpufreq: powernow: Don't validate the frequency table twice
  ...
parents be553754 103cf0e5
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -198,6 +198,31 @@ Description:
		time (in microseconds) this cpu should spend in this idle state
		to make the transition worth the effort.

What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/
Date:		March 2018
KernelVersion:	v4.17
Contact:	Linux power management list <linux-pm@vger.kernel.org>
Description:
		Idle state usage statistics related to suspend-to-idle.

		This attribute group is only present for states that can be
		used in suspend-to-idle with suspended timekeeping.

What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/time
Date:		March 2018
KernelVersion:	v4.17
Contact:	Linux power management list <linux-pm@vger.kernel.org>
Description:
		Total time spent by the CPU in suspend-to-idle (with scheduler
		tick suspended) after requesting this state.

What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/usage
Date:		March 2018
KernelVersion:	v4.17
Contact:	Linux power management list <linux-pm@vger.kernel.org>
Description:
		Total number of times this state has been requested by the CPU
		while entering suspend-to-idle.

What:		/sys/devices/system/cpu/cpu#/cpufreq/*
Date:		pre-git history
+14 −0
Original line number Diff line number Diff line
@@ -287,3 +287,17 @@ Description:
		Writing a "1" to this file enables the debug messages and
		writing a "0" (default) to it disables them.  Reads from
		this file return the current value.

What:		/sys/power/resume_offset
Date:		April 2018
Contact:	Mario Limonciello <mario.limonciello@dell.com>
Description:
		This file is used for telling the kernel an offset into a disk
		to use when hibernating the system such as with a swap file.

		Reads from this file will display the current offset
		the kernel will be using on the next hibernation
		attempt.

		Using this sysfs file will override any values that were
		set using the kernel command line for disk offset.
 No newline at end of file
+0 −4
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ Optional properties:
  in unit of nanoseconds.
- voltage-tolerance: Specify the CPU voltage tolerance in percentage.
- #cooling-cells:
- cooling-min-level:
- cooling-max-level:
     Please refer to Documentation/devicetree/bindings/thermal/thermal.txt.

Examples:
@@ -40,8 +38,6 @@ cpus {
		>;
		clock-latency = <61036>; /* two CLK32 periods */
		#cooling-cells = <2>;
		cooling-min-level = <0>;
		cooling-max-level = <2>;
	};

	cpu@1 {
+0 −4
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@ Optional properties:
	       flow is handled by hardware, hence no software "voltage tracking" is
	       needed.
- #cooling-cells:
- cooling-min-level:
- cooling-max-level:
	Please refer to Documentation/devicetree/bindings/thermal/thermal.txt
	for detail.

@@ -67,8 +65,6 @@ Example 1 (MT7623 SoC):
		clock-names = "cpu", "intermediate";
		operating-points-v2 = <&cpu_opp_table>;
		#cooling-cells = <2>;
		cooling-min-level = <0>;
		cooling-max-level = <7>;
	};
	cpu@1 {
		device_type = "cpu";
+9 −1
Original line number Diff line number Diff line
@@ -24,8 +24,16 @@ Some warnings, first.
 * see the FAQ below for details.  (This is not true for more traditional
 * power states like "standby", which normally don't turn USB off.)

Swap partition:
You need to append resume=/dev/your_swap_partition to kernel command
line. Then you suspend by
line or specify it using /sys/power/resume.

Swap file:
If using a swapfile you can also specify a resume offset using
resume_offset=<number> on the kernel command line or specify it
in /sys/power/resume_offset.

After preparing then you suspend by

echo shutdown > /sys/power/disk; echo disk > /sys/power/state

Loading