platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/4] Add vendor agnostic mechanism to report hardware sleep
@ 2023-03-30 19:44 Mario Limonciello
  2023-03-30 19:44 ` [PATCH v5 1/4] PM: Add a sysfs file to represent time spent in hardware sleep state Mario Limonciello
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Mario Limonciello @ 2023-03-30 19:44 UTC (permalink / raw)
  To: Sven van Ashbrook, John Stultz, platform-driver-x86, linux-pm
  Cc: Raul Rangel, David E Box, Rajat Jain, S-k Shyam-sundar,
	Rafael J . Wysocki, Hans de Goede, linux-kernel,
	Mario Limonciello

An important part of validating that s0ix worked properly is to check how much
of a cycle was spent in a hardware sleep state.

The reporting of hardware sleep is a mix of kernel messages and sysfs files
that vary from vendor to vendor. Collecting this information requires extra
information on the kernel command line or fetching from debugfs.

To make this information more readily accessible introduce a new file in
suspend_stats that drivers can report into during their resume routine.

Userspace can fetch this information and compare it against the duration of
the cycle to allow determining residency percentages and flagging problems.

v4->v5
 * Stop calculating a percentage, let userspace do this if desirable.
   Userspace may just care != 0.
 * Fix S3 case for Intel PMC

Previous submission:
https://lore.kernel.org/all/20221117225822.16154-1-mario.limonciello@amd.com/

Mario Limonciello (4):
  PM: Add a sysfs file to represent time spent in hardware sleep state
  platform/x86/amd: pmc: Report duration of time in hw sleep state
  platform/x86/intel/pmc: core: Always capture counters on suspend
  platform/x86/intel/pmc: core: Report duration of time in HW sleep
    state

 Documentation/ABI/testing/sysfs-power |  9 +++++++++
 drivers/platform/x86/amd/pmc.c        |  5 ++---
 drivers/platform/x86/intel/pmc/core.c | 15 +++++++-------
 drivers/platform/x86/intel/pmc/core.h |  2 --
 include/linux/suspend.h               |  2 ++
 kernel/power/main.c                   | 29 +++++++++++++++++++++++++++
 6 files changed, 49 insertions(+), 13 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-04-03 18:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 19:44 [PATCH v5 0/4] Add vendor agnostic mechanism to report hardware sleep Mario Limonciello
2023-03-30 19:44 ` [PATCH v5 1/4] PM: Add a sysfs file to represent time spent in hardware sleep state Mario Limonciello
2023-03-31 18:01   ` Rafael J. Wysocki
2023-03-31 18:05     ` Limonciello, Mario
2023-03-31 18:07       ` Rafael J. Wysocki
2023-03-31 18:13         ` Limonciello, Mario
2023-03-31 18:25           ` Rafael J. Wysocki
2023-03-30 19:44 ` [PATCH v5 2/4] platform/x86/amd: pmc: Report duration of time in hw " Mario Limonciello
2023-03-30 19:44 ` [PATCH v5 3/4] platform/x86/intel/pmc: core: Always capture counters on suspend Mario Limonciello
2023-04-03 16:58   ` Box, David E
2023-03-30 19:44 ` [PATCH v5 4/4] platform/x86/intel/pmc: core: Report duration of time in HW sleep state Mario Limonciello
2023-03-31  3:02   ` kernel test robot
2023-03-31 18:05   ` Rafael J. Wysocki
2023-04-03 18:00     ` Box, David E
2023-04-03 18:07       ` Limonciello, Mario
2023-04-03 18:32         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).