[PATCH 1/2] powerpc/papr_scm: Fetch nvdimm performance stats from PHYP

2020-06-21 Thread Vaibhav Jain
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

[PATCH 2/2] powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric

2020-06-21 Thread Vaibhav Jain
We add support for reporting 'fuel-gauge' NVDIMM metric via PAPR_PDSM_HEALTH pdsm payload. 'fuel-gauge' metric indicates the usage life remaining of a papr-scm compatible NVDIMM. PHYP exposes this metric via the H_SCM_PERFORMANCE_STATS. The metric value is returned from the pdsm by extending the r

[PATCH 0/2] powerpc/papr_scm: add support for reporting NVDIMM 'life_used_percentage' metric

2020-06-21 Thread Vaibhav Jain
This small patchset implements kernel side support for reporting 'life_used_percentage' metric in NDCTL with dimm health output for papr-scm NVDIMMs. With corresponding NDCTL side changes [1] output for should be like: $ sudo ndctl list -DH [ { "dev":"nmem0", "health":{ "health_sta

Re: [GIT PULL] libnvdimm for v5.8-rc2

2020-06-21 Thread Michael Ellerman
Dan Williams writes: > Hi Linus, please pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm > tags/libnvdimm-for-5.8-rc2 > > ...to receive a feature (papr_scm health retrieval) and a fix (sysfs > attribute visibility) for v5.8. > > Vaibhav explains in the merge commit belo