Files
linux/Documentation/ABI/testing
Vaibhav Jain 2d02bf835e powerpc/papr_scm: Fetch nvdimm performance stats from PHYP
Update papr_scm.c to query dimm performance statistics from PHYP via
H_SCM_PERFORMANCE_STATS hcall and export them to user-space as PAPR
specific NVDIMM attribute 'perf_stats' in sysfs. The patch also
provide a sysfs ABI documentation for the stats being reported and
their meanings.

During NVDIMM probe time in papr_scm_nvdimm_init() a special variant
of H_SCM_PERFORMANCE_STATS hcall is issued to check if collection of
performance statistics is supported or not. If successful then a PHYP
returns a maximum possible buffer length needed to read all
performance stats. This returned value is stored in a per-nvdimm
attribute 'stat_buffer_len'.

The layout of request buffer for reading NVDIMM performance stats from
PHYP is defined in 'struct papr_scm_perf_stats' and 'struct
papr_scm_perf_stat'. These structs are used in newly introduced
drc_pmem_query_stats() that issues the H_SCM_PERFORMANCE_STATS hcall.

The sysfs access function perf_stats_show() uses value
'stat_buffer_len' to allocate a buffer large enough to hold all
possible NVDIMM performance stats and passes it to
drc_pmem_query_stats() to populate. Finally statistics reported in the
buffer are formatted into the sysfs access function output buffer.

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200731064153.182203-2-vaibhav@linux.ibm.com
2020-07-31 22:55:27 +10:00
..
2011-10-24 16:52:39 +02:00
2019-06-15 08:12:45 +02:00
2018-02-23 08:17:28 -07:00
2013-03-23 16:11:31 -07:00
2012-04-23 14:23:32 +03:00
2018-11-12 10:33:50 +01:00
2011-03-22 04:53:09 -03:00
2017-10-30 11:46:04 +01:00
2008-11-12 17:17:18 -08:00
2017-06-03 19:29:26 +09:00
2018-03-17 14:20:54 +01:00
2019-06-15 08:12:45 +02:00
2019-06-15 08:12:45 +02:00
2020-02-22 09:25:42 +08:00
2019-06-15 08:12:45 +02:00
2015-04-30 22:15:04 +01:00
2011-04-29 18:09:34 -07:00
2009-02-18 15:37:56 -08:00
2008-07-24 10:47:17 -07:00
2008-04-18 08:56:07 -07:00
2009-06-18 13:04:04 -07:00
2015-12-08 14:50:12 +01:00