Re: [PATCH v2] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible
From: Vaibhav Jain <hidden>
Date: 2021-05-07 12:19:30
Hi Ira, Thanks for looking into this patch Ira Weiny [off-list ref] writes:
On Thu, May 06, 2021 at 12:46:06AM +0530, Vaibhav Jain wrote:quoted
Currently drc_pmem_qeury_stats() generates a dev_err in case "Enable Performance Information Collection" feature is disabled from HMC or performance stats are not available for an nvdimm. The error is of the form below: papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Failed to query performance stats, Err:-10 This error message confuses users as it implies a possible problem with the nvdimm even though its due to a disabled/unavailable feature. We fix this by explicitly handling the H_AUTHORITY and H_UNSUPPORTED errors from the H_SCM_PERFORMANCE_STATS hcall. In case of H_AUTHORITY error an info message is logged instead of an error, saying that "Permission denied while accessing performance stats". Also '-EACCES' error is return instead of -EPERM.I thought you clarified before that this was a permission issue. So why change the error to EACCES?
EACCESS("Permission Denied") felt like a more accurate error code for
this case than EPERM("Operation not permitted"). So switched the usage
of EPERM error code to handle the case if this hcall is not supported
for an nvdimm.
quoted
In case of H_UNSUPPORTED error we return a -EPERM error back from drc_pmem_query_stats() indicating that performance stats-query operation is not supported on this nvdimm.EPERM seems wrong here too... ENOTSUP?
Yes, will change it to EOPNOTSUPP in v3.
Ira _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
-- Cheers ~ Vaibhav