From: Vaibhav Jain <vaibhav@linux.ibm.com>
To: linux-nvdimm@lists.01.org
Cc: Vaibhav Jain <vaibhav@linux.ibm.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
Subject: [ndctl RFC-PATCH 0/4] Add support for reporting PAPR NVDIMM Statistics
Date: Mon, 18 May 2020 16:50:19 +0530 [thread overview]
Message-ID: <20200518112023.147139-1-vaibhav@linux.ibm.com> (raw)
This patch-set proposes addition of new functionality to ndctl and
libndctl enabling them to report vendor specific NVDIMM Statistics
(dimm-stats) like "Cache Read/Write Hit Count" which arent S.M.A.R.T
attributes but still indicate important NVDIMM performance metrics.
Until now these statistics were exposed via vendor specific tools
like ipmictl[1] in case of Intel Optane-DC memory. These patch-set
however tries to implement a generic abstraction within libndctl to
report such statistics from the ndctl tool.
The patch-set proposes to add a new command line arg '--stats' / '-S'
that reports vendor specific dimm-stats for a NVDIMM. Below is an
example invocation and output of the proposed changes:
# ndctl list -D --stats
[
{
"dev":"nmem0",
"stats":{
"Controller Reset Count":2,
"Controller Reset Elapsed Time":603331,
"Power-on Seconds":603931,
"Life Remaining":"100%",
"Critical Resource Utilization":"0%",
"Host Load Count":5781028,
"Host Store Count":8966800,
"Host Load Duration":975895365,
"Host Store Duration":716230690,
"Media Read Count":0,
"Media Write Count":6313,
"Media Read Duration":0,
"Media Write Duration":9679615,
"Cache Read Hit Count":5781028,
"Cache Write Hit Count":8442479,
"Fast Write Count":8969912
}
}
]
As a proof of concept the patch-set implements reporting dimm-stats for
PAPR compatible NVDIMMs. The output above is from a PPC64 PSeries
Guest LPAR with an NVDIMM, running on a PowerVM Hyper-visor.
The patch-set is dependent on existing patch-set "[ndctl PATCH v3 0/6]
Add support for reporting papr-scm nvdimm health" available at
Ref[2] and [3]. That patch-set implemented the base infrastructure
needed to support PAPR complaint NVDIMMs in ndctl and libndctl.
For PAPR compliant NVDIMMs we also depend on kernel side changes
published at [4] that add support for necessary pdsms to expose
dimm-stats to libndctl via CMD_CALL ioctl interface.
Structure of the patch-set
==========================
First patch in the series starts with implementing necessary
infrastructure in libndctl to introduce two new dimm_ops namely
'new_stats' and 'get_stat' that can be implemented by dimm-providers
to provide libndctl access to vendor specific dimm-stats. The patch
also implements necessary changes in ndctl ndctl/util/json-smart.c to
call these new dimm-ops and generate json-c objects to generate an
output as mentioned above.
Next three patches deal with implementing support for these new
dimm-ops for papr_scm in libndctl. Patch-2 implements dimm-op
'new_stats' that returns a 'struct ndctl_cmd' that can be submitted to
libnvdimm for fetching dimm-stats and copy them to papr_scm managed
buffer.
Patch-2 implements parsing and clean-up of the fetched dimm-stats from
kernel.
Finally Patch-3 implements dimm_ops 'get_stat' that provides ndctl
access to dimm-stat which then constructs a json object aggregating
them and then generating a text output from it.
References
==========
[1] https://docs.pmem.io/ipmctl-user-guide/instrumentation/show-device-performance
[2] https://github.com/vaibhav92/ndctl/tree/papr_scm_health_v7
[3] https://lore.kernel.org/linux-nvdimm/20200420075556.272174-1-vaibhav@linux.ibm.com/
[4] https://lore.kernel.org/linux-nvdimm/20200518110814.145644-1-vaibhav@linux.ibm.com
Vaibhav Jain (4):
ndctl,libndctl: Implement new dimm-ops 'new_stats' and 'get_stat'
papr_scm: Add support for fetching dimm-stats
papr_scm: Implement parsing and clean-up for fetched dimm stats
papr_scm: Implement dimm op 'get_stat'
Documentation/ndctl/ndctl-list.txt | 24 +++
ndctl/lib/libndctl.sym | 5 +
ndctl/lib/papr_scm.c | 300 ++++++++++++++++++++++++++++-
ndctl/lib/papr_scm_pdsm.h | 48 +++++
ndctl/lib/private.h | 6 +
ndctl/lib/smart.c | 26 +++
ndctl/libndctl.h | 23 +++
ndctl/list.c | 9 +
ndctl/util/json-smart.c | 73 +++++++
util/json.h | 1 +
10 files changed, 514 insertions(+), 1 deletion(-)
--
2.26.2
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next reply other threads:[~2020-05-18 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 11:20 Vaibhav Jain [this message]
2020-05-18 11:20 ` [ndctl RFC-PATCH 1/4] ndctl,libndctl: Implement new dimm-ops 'new_stats' and 'get_stat' Vaibhav Jain
2020-05-18 11:20 ` [ndctl RFC-PATCH 2/4] papr_scm: Add support for fetching dimm-stats Vaibhav Jain
2020-05-18 11:20 ` [ndctl RFC-PATCH 3/4] papr_scm: Implement parsing and clean-up for fetched dimm stats Vaibhav Jain
2020-05-18 11:20 ` [ndctl RFC-PATCH 4/4] papr_scm: Implement dimm op 'get_stat' Vaibhav Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200518112023.147139-1-vaibhav@linux.ibm.com \
--to=vaibhav@linux.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).