linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/3] Introduce infrastructure to report time in hardware sleep state
@ 2022-11-10  6:47 Mario Limonciello
  2022-11-10  6:47 ` [RFC v2 1/3] PM: Add a sysfs files to represent sleep duration Mario Limonciello
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Mario Limonciello @ 2022-11-10  6:47 UTC (permalink / raw)
  To: Sven van Ashbrook, Rafael J Wysocki, linux-pm,
	platform-driver-x86, Stephen Boyd, linux-kernel
  Cc: Rajneesh Bhardwaj, S-k Shyam-sundar, rrangel, Rajat Jain,
	David E Box, Hans de Goede, Mario Limonciello

Sven van Ashbrook brought a patch to the kernel mailing list that
attempted to change the reporting level of a s0ix entry issue to a
different debugging level so that infastructure used by Google could
better scan logs to catch problems.

This approach was rejected, but during the conversation another
suggestion was made by David E. Box to introduce some infrastructure
into the kernel to report this information.

As it's information that is reported by both AMD and Intel platforms
over s2idle, this seems to make sense.

This series introduces new sysfs files representing duration in a hardware
sleep state and total sleep duration.

The expectation is that userspace could read these file after s2idle
occurred to infer whta percentage of time was spent in a hardware sleep
state.

RFC v1->v2:
 * Rename sysfs file for time in hardware state
 * Export a sysfs file for total time in suspend
 * Only export sysfs file for hardware state if system supports low
   power idle.

Mario Limonciello (3):
  PM: Add a sysfs files to represent sleep duration
  platform/x86/amd: pmc: Report duration of time in deepest hw state
  platform/x86/intel/pmc: core: Report duration of time in deepest HW
    state

 Documentation/ABI/testing/sysfs-power | 17 +++++++++++
 drivers/platform/x86/amd/pmc.c        |  4 +--
 drivers/platform/x86/intel/pmc/core.c |  2 ++
 include/linux/suspend.h               |  5 ++++
 kernel/power/main.c                   | 42 +++++++++++++++++++++++++++
 kernel/power/suspend.c                |  2 ++
 kernel/time/timekeeping.c             |  2 ++
 7 files changed, 71 insertions(+), 3 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2022-11-17  2:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10  6:47 [RFC v2 0/3] Introduce infrastructure to report time in hardware sleep state Mario Limonciello
2022-11-10  6:47 ` [RFC v2 1/3] PM: Add a sysfs files to represent sleep duration Mario Limonciello
2022-11-13 23:53   ` Thomas Gleixner
2022-11-14 19:12     ` Limonciello, Mario
2022-11-15 10:32       ` Hans de Goede
2022-11-15 14:13         ` Limonciello, Mario
2022-11-17  2:40           ` Box, David E
2022-11-14  7:12   ` Greg KH
2022-11-15 14:45   ` Rafael J. Wysocki
2022-11-15 15:17     ` Limonciello, Mario
2022-11-15 16:35       ` Rafael J. Wysocki
     [not found]         ` <CAHQZ30BCXtyJ9qqHHX5eztXbgA_A8yH48+AQVMCB64CXjqE+hQ@mail.gmail.com>
2022-11-15 17:26           ` Limonciello, Mario
2022-11-15 17:52             ` Rafael J. Wysocki
2022-11-15 17:58               ` Limonciello, Mario
2022-11-15 19:08                 ` Rafael J. Wysocki
2022-11-10  6:47 ` [RFC v2 2/3] platform/x86/amd: pmc: Report duration of time in deepest hw state Mario Limonciello
2022-11-10  6:47 ` [RFC v2 3/3] platform/x86/intel/pmc: core: Report duration of time in HW sleep state Mario Limonciello
2022-11-13 23:57   ` Thomas Gleixner
2022-11-14 19:06     ` Limonciello, Mario

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).