[ndctl PATCH] libndctl/papr: Fix probe for papr-scm compatible nvdimms

2021-05-17 Thread Vaibhav Jain
then forward its probe to populate_dimm_attributes(). Fixes: daef3a386a9c("libndctl: Unify adding dimms for papr and nfit families") Signed-off-by: Vaibhav Jain --- ndctl/lib/libndctl.c | 57 ++-- 1 file changed, 55 insertions(+), 2 deletions(-

Re: [PATCH v2] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-05-13 Thread Vaibhav Jain
Thanks for looking into this patch Dan, Dan Williams writes: > On Fri, May 7, 2021 at 4:40 AM Vaibhav Jain wrote: >> >> In case performance stats for an nvdimm are not available, reading the >> 'perf_stats' sysfs file returns an -ENOENT error. A better approac

[PATCH v3] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-05-13 Thread Vaibhav Jain
ols/scripts that are dependent on presence of its sysfs file. Hence I dont expect any user-space breakage with this patch. Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Reviewed-by: Dan Williams Signed-off-by: Vaibhav Jain --- Changelog: v3: * Minor spe

[PATCH v3] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-05-07 Thread Vaibhav Jain
formance stats-query operation is not supported on this nvdimm. Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Signed-off-by: Vaibhav Jain --- Changelog v3: * Return EOPNOTSUPP error in case of H_UNSUPPORTED [ Ira ] * Return EPERM in case of H_AUT

Re: [PATCH v2] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-05-07 Thread Vaibhav Jain
Hi Ira, Thanks for looking into this patch Ira Weiny writes: > On Thu, May 06, 2021 at 12:46:06AM +0530, Vaibhav Jain wrote: >> Currently drc_pmem_qeury_stats() generates a dev_err in case >> "Enable Performance Information Collection" feature is disabled from >&g

Re: [PATCH] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-05-07 Thread Vaibhav Jain
"Aneesh Kumar K.V" writes: > Vaibhav Jain writes: > >> In case performance stats for an nvdimm are not available, reading the >> 'perf_stats' sysfs file returns an -ENOENT error. A better approach is >> to make the 'perf_stats' file entire

[PATCH v2] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-05-07 Thread Vaibhav Jain
riv.stat_buffer_len' is moved from papr_scm_nvdimm_init() to papr_scm_probe() so that it value is available when 'papr_nd_attribute_visible()' is called during nvdimm initialization. Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') S

[PATCH] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-05-05 Thread Vaibhav Jain
riv.stat_buffer_len' is moved from papr_scm_nvdimm_init() to papr_scm_probe() so that it value is available when 'papr_nd_attribute_visible()' is called during nvdimm initialization. Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP&#x

[PATCH v2] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-05-05 Thread Vaibhav Jain
icating that performance stats-query operation is not supported on this nvdimm. Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Signed-off-by: Vaibhav Jain --- Changelog v2: * Updated the message logged in case of H_AUTHORITY error [ Ira ] * Switc

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-15 Thread Vaibhav Jain
Ira Weiny writes: > On Wed, Apr 14, 2021 at 09:51:40PM +0530, Vaibhav Jain wrote: >> Thanks for looking into this patch Ira, >> >> Ira Weiny writes: >> >> > On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote: >> >> Currently dr

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-15 Thread Vaibhav Jain
Thanks for looking into this Dan, Dan Williams writes: > On Wed, Apr 14, 2021 at 5:40 AM Vaibhav Jain wrote: >> >> Currently drc_pmem_qeury_stats() generates a dev_err in case >> "Enable Performance Information Collection" feature is disabled from >>

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-14 Thread Vaibhav Jain
Thanks for looking into this patch Ira, Ira Weiny writes: > On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote: >> Currently drc_pmem_qeury_stats() generates a dev_err in case >> "Enable Performance Information Collection" feature is disabled from >>

[PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-14 Thread Vaibhav Jain
s in-accessible". Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Signed-off-by: Vaibhav Jain --- arch/powerpc/platforms/pseries/papr_scm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerp

Re: [PATCH v3] powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall

2021-04-14 Thread Vaibhav Jain
"Aneesh Kumar K.V" writes: > Vaibhav Jain writes: > >> Hi Shiva, >> >> Apologies for a late review but something just caught my eye while >> working on a different patch. >> >> Shivaprasad G Bhat writes: >> >>> Add support f

Re: [PATCH v3] libnvdimm/region: Update nvdimm_has_flush() to handle explicit 'flush' callbacks

2021-04-13 Thread Vaibhav Jain
Thanks Pankaj for looking into this patch, Pankaj Gupta writes: > Hi Vaibhav, > >> In case a platform doesn't provide explicit flush-hints but provides an >> explicit flush callback, then nvdimm_has_flush() still returns '0' >> indicating that writes do not require flushing. This happens on PPC6

Re: [PATCH v3] powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall

2021-04-13 Thread Vaibhav Jain
Hi Shiva, Apologies for a late review but something just caught my eye while working on a different patch. Shivaprasad G Bhat writes: > Add support for ND_REGION_ASYNC capability if the device tree > indicates 'ibm,hcall-flush-required' property in the NVDIMM node. > Flush is done by issuing H_

Re: [PATCH v2] libnvdimm/region: Update nvdimm_has_flush() to handle ND_REGION_ASYNC

2021-04-08 Thread Vaibhav Jain
"Aneesh Kumar K.V" writes: > On 4/6/21 5:07 PM, Vaibhav Jain wrote: >> Hi Aneesh, >> Thanks for looking into this patch. >> >> "Aneesh Kumar K.V" writes: >> >>> Vaibhav Jain writes: >>> >>>> In case a platfor

[PATCH v3] libnvdimm/region: Update nvdimm_has_flush() to handle explicit 'flush' callbacks

2021-04-08 Thread Vaibhav Jain
c/papr_scm: Implement support for H_SCM_FLUSH hcall" https://lore.kernel.org/linux-nvdimm/161703936121.36.7260632399582101498.stgit@e1fbed493c87 Cc: Fixes: c5d4355d10d4 ("libnvdimm: nd_region flush callback support") Reported-by: Shivaprasad G Bhat Signed-off-by: Vaibhav Jain --- Chang

Re: [PATCH v2] libnvdimm/region: Update nvdimm_has_flush() to handle ND_REGION_ASYNC

2021-04-06 Thread Vaibhav Jain
Hi Aneesh, Thanks for looking into this patch. "Aneesh Kumar K.V" writes: > Vaibhav Jain writes: > >> In case a platform doesn't provide explicit flush-hints but provides an >> explicit flush callback via ND_REGION_ASYNC region flag, then >> nvdimm_has_fl

[PATCH v2] libnvdimm/region: Update nvdimm_has_flush() to handle ND_REGION_ASYNC

2021-04-05 Thread Vaibhav Jain
; without any explicit mappings as in case of virtio-pmem. References: [1] "powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall" https://lore.kernel.org/linux-nvdimm/161703936121.36.7260632399 582101498.stgit@e1fbed493c87 Cc: Fixes: c5d4355d10d4 ("libnvdimm: nd_region flush

[PATCH v2] powerpc/mm: Add cond_resched() while removing hpte mappings

2021-04-04 Thread Vaibhav Jain
() to the loop in htap_remove_mapping() that issues hcall to remove hpte mapping. The call to cond_resched() is issued every HZ jiffies which should prevent the soft-lockup from being reported. Suggested-by: Aneesh Kumar K.V Signed-off-by: Vaibhav Jain --- Changelog: v2: Issue cond_resched

[PATCH] libnvdimm/region: Update nvdimm_has_flush() to handle ND_REGION_ASYNC

2021-04-02 Thread Vaibhav Jain
cm: Implement support for H_SCM_FLUSH hcall" https://lore.kernel.org/linux-nvdimm/161703936121.36.7260632399 582101498.stgit@e1fbed493c87 Reported-by: Shivaprasad G Bhat Signed-off-by: Vaibhav Jain --- drivers/nvdimm/region_devs.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions

[PATCH] powerpc/papr_scm: Mark nvdimm as unarmed if needed during probe

2021-03-29 Thread Vaibhav Jain
force query of nvdimm health via __drc_pmem_query_health() and if nvdimm is found to be unarmed then set the nvdimm flag ND_UNARMED for nvdimm_create(). Signed-off-by: Vaibhav Jain --- arch/powerpc/platforms/pseries/papr_scm.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch

Re: [PATCH v2] powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall

2021-03-24 Thread Vaibhav Jain
Hi Shiva, Thanks for the patch. Few minor review comments: Shivaprasad G Bhat writes: > Add support for ND_REGION_ASYNC capability if the device tree > indicates 'ibm,hcall-flush-required' property in the NVDIMM node. > Flush is done by issuing H_SCM_FLUSH hcall to the hypervisor. > > If the

Re: Feedback requested: Exposing NVDIMM performance statistics in a generic way

2020-11-22 Thread Vaibhav Jain
/20201108211549.122018-1-vaib...@linux.ibm.com/ Thanks, ~ Vaibhav Dan Williams writes: > On Fri, Oct 23, 2020 at 10:28 AM Michal Suchánek wrote: >> >> Hello, >> >> On Thu, May 28, 2020 at 11:59 AM Vaibhav Jain wrote: >> > >> > Thanks for this taking time to look into

[RFC][PATCH 2/2] powerpc/papr_scm: Implement support for reporting generic nvdimm stats

2020-11-08 Thread Vaibhav Jain
y is queried by newly introduced 'papr_scm_get_stat()' that verifies if the requested nvdimm-stat is supported and if yes does an hcall via 'drc_pmem_query_stat()' to request the performance-stat and return it back to libnvdimm. Signed-off-by: Vaibhav Jain --- arch/powerp

[RFC][PATCH 1/2] libnvdimm: Introduce ND_CMD_GET_STAT to retrieve nvdimm statistics

2020-11-08 Thread Vaibhav Jain
-ENOENT) for request to read that nvdimm-statistic. The value for a specific nvdimm-stat is exchanged via newly introduced 'struct nd_cmd_get_dimm_stat' that hold a single statistics and a union of possible values types. Presently only '__s64' type of generic attributes are supporte

Re: [ndctl PATCH] libndctl: Fix probe of non-nfit nvdimms

2020-10-09 Thread Vaibhav Jain
Hi Dan and Vishal, Thanks so much for quick turnaround on this. Dan Williams writes: > On Fri, Oct 9, 2020 at 11:36 AM Verma, Vishal L > wrote: >> >> On Fri, 2020-10-09 at 17:30 +0530, Vaibhav Jain wrote: >> > commit 107a24ff429f ("ndctl/list: Add firm

[ndctl PATCH] libndctl: Fix probe of non-nfit nvdimms

2020-10-09 Thread Vaibhav Jain
he nfit is not detected on the associated bus. Fixes: 107a24ff429fa("ndctl/list: Add firmware activation enumeration") Signed-off-by: Vaibhav Jain --- ndctl/lib/libndctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 554696386f48.

Re: [PATCH] powerpc/papr_scm: Add PAPR command family to pass-through command-set

2020-09-28 Thread Vaibhav Jain
Hi Dan, Ira and Vishal, Can you please take a look at this patch. Without it the functionality to report nvdimm health via ndctl breaks on 5.9 Thanks, ~ Vaibhav Vaibhav Jain writes: > Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask' > acceptable by papr_scm. T

Re: [PATCH v2] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-15 Thread Vaibhav Jain
Michael Ellerman writes: > Vaibhav Jain writes: >> A warning is reported by the kernel in case perf_stats_show() returns >> an error code. The warning is of the form below: >> >> papr_scm ibm,persistent-memory:ibm,pmemory@4411: >>Failed to

[PATCH] powerpc/papr_scm: Support dynamic enable/disable of performance statistics

2020-09-13 Thread Vaibhav Jain
t struct member gone, various functions that depended on it are updated. Specifically perf_stats_show() is updated to query the PHYP first for the size of buffer needed to hold all performance statistics instead of relying on 'stat_buffer_len' Signed-off-by: Vaibhav Jain --- arch/powerp

[PATCH] powerpc/papr_scm: Add PAPR command family to pass-through command-set

2020-09-13 Thread Vaibhav Jain
CALL processing to ensure only known command families can use the general ND_CMD_CALL pass-through functionality. Without this change the ND_CMD_CALL pass-through targeting NVDIMM_FAMILY_PAPR error out with -EINVAL. Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices") Signed

Re: [PATCH] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-12 Thread Vaibhav Jain
Ira Weiny writes: > On Sat, Sep 12, 2020 at 01:36:46AM +0530, Vaibhav Jain wrote: >> Thanks for reviewing this patch Ira, >> >> >> Ira Weiny writes: >> >> > On Thu, Sep 10, 2020 at 02:52:12PM +0530, Vaibhav Jain wrote: >> >> A war

[PATCH v2] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-12 Thread Vaibhav Jain
x27; to 'ssize_t' that prevents the compiler from truncating the return value of drc_pmem_query_stats() and returning correct signed value back from perf_stats_show(). Fixes: 2d02bf835e573 ('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Signed-off-by: Vaibhav Jain ---

Re: [PATCH] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-11 Thread Vaibhav Jain
Thanks for reviewing this patch Ira, Ira Weiny writes: > On Thu, Sep 10, 2020 at 02:52:12PM +0530, Vaibhav Jain wrote: >> A warning is reported by the kernel in case perf_stats_show() returns >> an error code. The warning is of the form below: >> >> papr_scm ibm,pe

[PATCH] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-10 Thread Vaibhav Jain
x27; to 'ssize_t' that prevents the compiler from truncating the return value of drc_pmem_query_stats() and returning correct signed value back from perf_stats_show(). Fixes: 2d02bf835e573 ('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Signed-off-by: Vaibhav Jain --- arc

[PATCH v2] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-09-07 Thread Vaibhav Jain
m performance stats from PHYP') Reported-by: Aneesh Kumar K.V Signed-off-by: Vaibhav Jain --- Change-log: v2: * Instead of checking for perfmon_capable() inside show_perf_stats() set the attribute as DEVICE_ATTR_ADMIN_RO [ Aneesh ] * Update patch description --- arch/powerpc/platforms/pseries/p

Re: [PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-19 Thread Vaibhav Jain
Thanks Aneesh and Mpe for reviewing this patch. Michael Ellerman writes: > "Aneesh Kumar K.V" writes: [snip] >>> >>> + /* Allow access only to perfmon capable users */ >>> + if (!perfmon_capable()) >>> + return -EACCES; >>> + >> >> An access check is usually done in open(). Thi

[PATCH] libnvdimm: Add a NULL entry to 'nvdimm_firmware_attributes'

2020-08-14 Thread Vaibhav Jain
s causes a loop in sysfs's 'create_files()' to read garbage beyond bounds of 'nvdimm_firmware_attributes' and trigger the oops. Fixes: 48001ea50d17f ("PM, libnvdimm: Add runtime firmware activation support") Reported-by: Sandipan Das Signed-off-by: Vaibhav Jain

[PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-12 Thread Vaibhav Jain
('powerpc/papr_scm: Fetch nvdimm performance stats from PHYP') Reported-by: Aneesh Kumar K.V Signed-off-by: Vaibhav Jain --- arch/powerpc/platforms/pseries/papr_scm.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc

Re: [PATCH] powerpc/papr_scm: Make access mode of 'perf_stats' attribute file to '0400'

2020-08-12 Thread Vaibhav Jain
Hi Mpe, Thanks for reviewing this patch. My responses below: Michael Ellerman writes: > Vaibhav Jain writes: >> The newly introduced 'perf_stats' attribute uses the default access >> mode of 0444 letting non-root users access performance stats of an >> nvdimm a

[PATCH] powerpc/papr_scm: Make access mode of 'perf_stats' attribute file to '0400'

2020-08-07 Thread Vaibhav Jain
hence its better to ward of access to this attribute from non-root users. Hence this patch updates the access-mode of 'perf_stats' sysfs attribute file to 0400 to make it only readable to root-users. Reported-by: Aneesh Kumar K.V Signed-off-by: Vaibhav Jain --- arch/powerpc/platform

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

2020-07-30 Thread Vaibhav Jain
ch performance stats catalogue. The patch also implements support for 'perf_stats' sysfs attribute to report the full catalogue of supported performance stats by PHYP. Second and final patch implements support for sending this value to libndctl by extending the PAPR_PDSM_HEALTH pdsm payload

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

2020-07-30 Thread Vaibhav Jain
issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibhav J

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

2020-07-30 Thread Vaibhav Jain
in the buffer are formatted into the sysfs access function output buffer. Signed-off-by: Vaibhav Jain --- Changelog: v4: * Fixed a build issue with this patch by moving a hunk from second patch in series to this patch. [ Aneesh ] v3: * Updated drc_pmem_query_stats() to not require &#x

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

2020-07-30 Thread Vaibhav Jain
in the buffer are formatted into the sysfs access function output buffer. Signed-off-by: Vaibhav Jain --- Changelog: v3: * Updated drc_pmem_query_stats() to not require 'buff_size' and 'out' args to the function. Instead 'buff_size' is calculated from 'nu

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

2020-07-30 Thread Vaibhav Jain
issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibh

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

2020-07-30 Thread Vaibhav Jain
the H_SCM_PERFORMANCE_STATS hcall and fetch performance stats catalogue. The patch also implements support for 'perf_stats' sysfs attribute to report the full catalogue of supported performance stats by PHYP. Second and final patch implements support for sending this value to libndctl by exten

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

2020-07-26 Thread Vaibhav Jain
issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibhav Jain -

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

2020-07-26 Thread Vaibhav Jain
ing needed to issue the H_SCM_PERFORMANCE_STATS hcall and fetch performance stats catalogue. The patch also implements support for 'perf_stats' sysfs attribute to report the full catalogue of supported performance stats by PHYP. Second and final patch implements support for sending this value to lib

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

2020-07-26 Thread Vaibhav Jain
in the buffer are formatted into the sysfs access function output buffer. Signed-off-by: Vaibhav Jain --- Changelog: Resend: None v2: * Updated 'struct papr_scm_perf_stats' and 'struct papr_scm_perf_stat' to use big-endian types. [ Aneesh ] * s/len_stat_buffer/stat_buffer_

[ndctl RESEND PATCH v2] monitor: Add epoll timeout for forcing a full dimm health check

2020-07-21 Thread Vaibhav Jain
Fuli Cc: Dan Williams Cc: Vishal Verma Signed-off-by: Vaibhav Jain --- Changelog: Resend * None v1..v2 * Changed the '--check-interval' arg to '--poll' [Dan Williams] * Update the documentation and patch description of the '--poll' arg to accuratly reflect that it

Re: [ndctl PATCH] papr: Check for command type in papr_xlat_firmware_status()

2020-07-21 Thread Vaibhav Jain
Vishal Verma writes: >> static int papr_xlat_firmware_status(struct ndctl_cmd *cmd) >> { >> -const struct nd_pkg_pdsm *pcmd = to_pdsm(cmd); >> - >> -return pcmd->cmd_status; >> +return (cmd->type == ND_CMD_CALL) ? to_pdsm(cmd)->cmd_status : 0; > > Is this correct? -- for non ND_CMD

[ndctl PATCH] papr: Check for command type in papr_xlat_firmware_status()

2020-07-21 Thread Vaibhav Jain
ot;ndctl/dimm: Rework dimm command status reporting") Fixes: 151d2876c49e ("papr: Add scaffolding to issue and handle PDSM requests") Reported-by: "Aneesh Kumar K.V" Signed-off-by: Vaibhav Jain --- ndctl/lib/papr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

[ndctl PATCH] libndctl/papr_scm: Add support for reporting "life_used_percentage" metric

2020-07-01 Thread Vaibhav Jain
or report health information for papr-scm based NVDIMMs [1][2] [1] commit 880901b45cdf ("libndctl,papr_scm: Implement support for PAPR_PDSM_HEALTH") [2] https://github.com/pmem/ndctl/commits/vj/papr_health Signed-off-by: Vaibhav Jain --- ndctl/lib/papr.c | 28 +++

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

2020-07-01 Thread Vaibhav Jain
issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibhav Jain

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

2020-07-01 Thread Vaibhav Jain
in the buffer are formatted into the sysfs access function output buffer. Signed-off-by: Vaibhav Jain --- Changelog: v2: * Fixed a bug in drc_pmem_query_stats() that was passing a NULL pointer to virt_to_pfn() [ Ira ] * Updated 'struct papr_scm_perf_stats' and 'struct papr_scm_p

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

2020-07-01 Thread Vaibhav Jain
rmance stats catalogue. The patch also implements support for 'perf_stats' sysfs attribute to report the full catalogue of supported performance stats by PHYP. Second and final patch implements support for sending this value to libndctl by extending the PAPR_PDSM_HEALTH pdsm payload to

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

2020-06-24 Thread Vaibhav Jain
Thanks for reviewing this patch Ira, My responses below inline. Ira Weiny writes: > On Mon, Jun 22, 2020 at 09:54:50AM +0530, Vaibhav Jain wrote: >> Update papr_scm.c to query dimm performance statistics from PHYP via >> H_SCM_PERFORMANCE_STATS hcall and export them to use

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

2020-06-24 Thread Vaibhav Jain
Thanks for reviewing this patch Ira, My responses below: Ira Weiny writes: [snip] >> +static int papr_pdsm_fuel_gauge(struct papr_scm_priv *p, >> +union nd_pdsm_payload *payload) >> +{ >> +int rc, size; >> +struct papr_scm_perf_stat *stat; >> +struct papr

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

2020-06-21 Thread Vaibhav Jain
in the buffer are formatted into the sysfs access function output buffer. Signed-off-by: Vaibhav Jain --- Documentation/ABI/testing/sysfs-bus-papr-pmem | 27 arch/powerpc/platforms/pseries/papr_scm.c | 139 ++ 2 files changed, 166 insertions(+) diff --git a/Documentatio

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

2020-06-21 Thread Vaibhav Jain
issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibhav Jain -

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

2020-06-21 Thread Vaibhav Jain
nd final patch implements support for sending this value to libndctl by extending the PAPR_PDSM_HEALTH pdsm payload to add a new field named 'dimm_fuel_gauge' to it. References == [1] https://github.com/vaibhav92/ndctl/tree/papr_scm_health_v13_run_guage Vaibhav Jain (2): powerpc/

[RESEND PATCH v2] monitor: Add epoll timeout for forcing a full dimm health check

2020-06-18 Thread Vaibhav Jain
Fuli Cc: Dan Williams Cc: Vishal Verma Signed-off-by: Vaibhav Jain --- Changelog: Resend * None v1..v2 * Changed the '--check-interval' arg to '--poll' [Dan Williams] * Update the documentation and patch description of the '--poll' arg to accuratly reflect that it

[ndctl PATCH v7 3/5] libndctl,papr_scm: Add definitions for PAPR nvdimm specific methods

2020-06-18 Thread Vaibhav Jain
ib...@linux.ibm.com/ [2] "ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods" https://lore.kernel.org/linux-nvdimm/20200615124407.32596-6-vaib...@linux.ibm.com/ Signed-off-by: Vaibhav Jain --- Changelog: v6..v7: * None v5..v6: * Updated 'papr_pdsm.h' to

[ndctl PATCH v7 4/5] papr: Add scaffolding to issue and handle PDSM requests

2020-06-18 Thread Vaibhav Jain
ging helpers for papr_scm that use the underlying libndctl provided logging. Signed-off-by: Vaibhav Jain --- Changelog: v6..v7: * None v5..v6: * Reworked the patch based on recent changes introduced for layout changes to 'struct nd_cmd_pkg'. * Removed function update_dimm_s

[ndctl PATCH v7 0/5] Add support for reporting papr nvdimm health

2020-06-18 Thread Vaibhav Jain
ps://lore.kernel.org/linux-nvdimm/20200615124407.32596-1-vaib...@linux.ibm.com/ [5] "ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods" https://lore.kernel.org/linux-nvdimm/20200615124407.32596-6-vaib...@linux.ibm.com/ Vaibhav Jain (5): libndctl: Refactor out add_dimm() to handle

[ndctl PATCH v7 1/5] libndctl: Refactor out add_dimm() to handle NFIT specific init

2020-06-18 Thread Vaibhav Jain
27;struct ndctl_dimm' there by limiting the functionality available. This patch shouldn't introduce any behavioral change. Signed-off-by: Vaibhav Jain --- Changelog: v6..v7: * Updated the patch description. [ Vishal ] * Removed a stale comment and assignment from add_dimm(). [ Visha

[ndctl PATCH v7 5/5] libndctl,papr_scm: Implement support for PAPR_PDSM_HEALTH

2020-06-18 Thread Vaibhav Jain
health' & 'smart_get_shutdown_state' as newly introduced functions papr_new_smart_health(), papr_smart_get_health() & papr_smart_get_shutdown_state() respectively. These callbacks should enable ndctl to report DIMM health. Signed-off-by: Vaibhav Jain --- Changelog: v6..

[ndctl PATCH v7 2/5] libncdtl: Add initial support for NVDIMM_FAMILY_PAPR nvdimm family

2020-06-18 Thread Vaibhav Jain
g/sysfs-bus-papr-pmem https://git.kernel.org/nvdimm/nvdimm/c/b791abf3201d724ac372c2ba1fa6e90d192e1dbf Signed-off-by: Vaibhav Jain --- Changelog: v6..v7: * Updated patch description based of review comments on v6 [ Vishal ] * Updated links in patch description to current version. [ Vishal ] * Added the missing copyright tex

Re: [ndctl PATCH v6 2/5] libncdtl: Add initial support for NVDIMM_FAMILY_PAPR nvdimm family

2020-06-17 Thread Vaibhav Jain
Hi Vishal, Thanks for reviewing this patch. I will be addressing your review comments in v7 of this patch series. ~ Vaibhav "Verma, Vishal L" writes: > On Tue, 2020-06-16 at 11:00 +0530, Vaibhav Jain wrote: >> Add necessary scaffolding in libndctl for dimms that support p

Re: [ndctl PATCH v6 1/5] libndctl: Refactor out add_dimm() to handle NFIT specific init

2020-06-17 Thread Vaibhav Jain
Hi Vishal, Thanks for reviewing this patch. I will be addressing your review comments in v7 of this patch series. ~ Vaibhav "Verma, Vishal L" writes: > On Tue, 2020-06-16 at 11:00 +0530, Vaibhav Jain wrote: >> Presently add_dimm() only probes dimms that support NFIT/ACPI. H

[ndctl PATCH v6 5/5] libndctl,papr_scm: Implement support for PAPR_PDSM_HEALTH

2020-06-15 Thread Vaibhav Jain
health' & 'smart_get_shutdown_state' as newly introduced functions papr_new_smart_health(), papr_smart_get_health() & papr_smart_get_shutdown_state() respectively. These callbacks should enable ndctl to report DIMM health. Signed-off-by: Vaibhav Jain --- Changelog:

[ndctl PATCH v6 3/5] libndctl,papr_scm: Add definitions for PAPR nvdimm specific methods

2020-06-15 Thread Vaibhav Jain
ib...@linux.ibm.com/ [2] "ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods" https://lore.kernel.org/linux-nvdimm/20200615124407.32596-6-vaib...@linux.ibm.com/ Signed-off-by: Vaibhav Jain --- Changelog: v5..v6: * Updated 'papr_pdsm.h' to recent kernel-uapi ve

[ndctl PATCH v6 4/5] papr: Add scaffolding to issue and handle PDSM requests

2020-06-15 Thread Vaibhav Jain
ging helpers for papr_scm that use the underlying libndctl provided logging. Signed-off-by: Vaibhav Jain --- Changelog: v5..v6: * Reworked the patch based on recent changes introduced for layout changes to 'struct nd_cmd_pkg'. * Removed function update_dimm_stats() and papr_dimm_

[ndctl PATCH v6 1/5] libndctl: Refactor out add_dimm() to handle NFIT specific init

2020-06-15 Thread Vaibhav Jain
to the 'struct ndctl_dimm' there-by limiting the functionality available. This patch shouldn't introduce any behavioral change. Signed-off-by: Vaibhav Jain --- Changelog: v5..v6: * Changed a return code for add_nfit_dimm() in case a allocation failed. [ Vishal ] * Updated an

[ndctl PATCH v6 2/5] libncdtl: Add initial support for NVDIMM_FAMILY_PAPR nvdimm family

2020-06-15 Thread Vaibhav Jain
ting/sysfs-bus-papr-pmem https://lore.kernel.org/linux-nvdimm/20200529214719.223344-4-vaib...@linux.ibm.com Signed-off-by: Vaibhav Jain --- Changelog: v5..v6: * Updated various dbg messages to use consistent dimm device name rather than dimm-id. [Vishal] * Minor changes to log messages in add_papr_dimm() [

[ndctl PATCH v6 0/5] Add support for reporting papr nvdimm health

2020-06-15 Thread Vaibhav Jain
m Reference" https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference [3] "Hypercall Op-codes (hcalls)" https://github.com/torvalds/linux/blob/master/Documentation/powerpc/papr_hcalls.rst [4] "powerpc/papr_scm: Add support for reporting nvdimm health" https://lo

Re: [PATCH v12 0/6] powerpc/papr_scm: Add support for reporting nvdimm health

2020-06-15 Thread Vaibhav Jain
This accidently got reposted. Please ignore. v13 version of the patch series located at https://lore.kernel.org/linux-nvdimm/20200615124407.32596-1-vaib...@linux.ibm.com Vaibhav Jain writes: > Changes since v11 [1]: > * Minor update to 'papr_pdsm.h' fixing a misleadi

Re: [PATCH v12 1/6] powerpc: Document details on H_SCM_HEALTH hcall

2020-06-15 Thread Vaibhav Jain
This accidently got reposted. Please ignore. Vaibhav Jain writes: > Add documentation to 'papr_hcalls.rst' describing the bitmap flags > that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM > specification. > > Cc: "Aneesh Kumar K . V" > Cc

[PATCH v13 6/6] powerpc/papr_scm: Implement support for PAPR_PDSM_HEALTH

2020-06-15 Thread Vaibhav Jain
r_pdsm_health() that queries the nvdimm health information and then copies this information to the package payload whose layout is defined by 'struct nd_papr_pdsm_health'. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Ja

[PATCH v13 0/6] powerpc/papr_scm: Add support for reporting nvdimm health

2020-06-15 Thread Vaibhav Jain
t returns the NVDIMM health information to libndctl. References: [2] "Power Architecture Platform Reference" https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference [3] commit 58b278f568f0 ("powerpc: Provide initial documentation for PAPR hcalls") [4] "L

[PATCH v13 2/6] seq_buf: Export seq_buf_printf

2020-06-15 Thread Vaibhav Jain
hristoph Hellwig Cc: Steven Rostedt Cc: Borislav Petkov Acked-by: Steven Rostedt (VMware) Signed-off-by: Vaibhav Jain --- Changelog: v12..v13: * None v11..v12: * None v10..v11: * None v9..v10: * None Resend: * Added ack from Steven Rostedt v8..v9: * None v7..v8: * Updated the patch title

[PATCH v13 4/6] powerpc/papr_scm: Improve error logging and handling papr_scm_ndctl()

2020-06-15 Thread Vaibhav Jain
the patch also updates the 'default' add a debug log unknown 'cmd' values. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v12..v13: * None v11..v12: * Added ack fr

[PATCH v13 1/6] powerpc: Document details on H_SCM_HEALTH hcall

2020-06-15 Thread Vaibhav Jain
Add documentation to 'papr_hcalls.rst' describing the bitmap flags that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM specification. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Acked-by: Ira Weiny Signed-off-by: Vaibhav Jain

[PATCH v13 5/6] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

2020-06-15 Thread Vaibhav Jain
on info present in corresponding PDSM descriptor and if valid calls the 'struct pdcm_cmd_desc.service' function to service the PDSM. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v12..v13: * s/struct nd_pdsm_cmd_

[PATCH v13 3/6] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-06-15 Thread Vaibhav Jain
ntroduced at Documentation/ABI/testing/sysfs-bus-papr-pmem. [1] commit 58b278f568f0 ("powerpc: Provide initial documentation for PAPR hcalls") Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v12..v13: *

[PATCH v12 4/6] powerpc/papr_scm: Improve error logging and handling papr_scm_ndctl()

2020-06-15 Thread Vaibhav Jain
the patch also updates the 'default' add a debug log unknown 'cmd' values. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v11..v12: * Added ack from Ira v10..

[PATCH v12 5/6] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

2020-06-15 Thread Vaibhav Jain
is called from papr_scm_ndctl() in case of a PDSM request is received via ND_CMD_CALL command from libnvdimm. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v11..v12: * Updated a misleading comment in 'papr_p

[PATCH v12 1/6] powerpc: Document details on H_SCM_HEALTH hcall

2020-06-15 Thread Vaibhav Jain
Add documentation to 'papr_hcalls.rst' describing the bitmap flags that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM specification. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Acked-by: Ira Weiny Signed-off-by: Vaibhav Jain

[PATCH v12 3/6] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-06-15 Thread Vaibhav Jain
ntroduced at Documentation/ABI/testing/sysfs-bus-papr-pmem. [1] commit 58b278f568f0 ("powerpc: Provide initial documentation for PAPR hcalls") Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v11..v1

[PATCH v12 6/6] powerpc/papr_scm: Implement support for PAPR_PDSM_HEALTH

2020-06-15 Thread Vaibhav Jain
r_pdsm_health() that queries the nvdimm health information and then copies this information to the package payload whose layout is defined by 'struct nd_papr_pdsm_health'. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Reviewed-by: Ira Weiny Si

[PATCH v12 0/6] powerpc/papr_scm: Add support for reporting nvdimm health

2020-06-15 Thread Vaibhav Jain
lth information to libndctl. References: [2] "Power Architecture Platform Reference" https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference [3] commit 58b278f568f0 ("powerpc: Provide initial documentation for PAPR hcalls") [4] "Linux on Power Architect

[PATCH v12 2/6] seq_buf: Export seq_buf_printf

2020-06-15 Thread Vaibhav Jain
hristoph Hellwig Cc: Steven Rostedt Cc: Borislav Petkov Acked-by: Steven Rostedt (VMware) Signed-off-by: Vaibhav Jain --- Changelog: v11..v12: * None v10..v11: * None v9..v10: * None Resend: * Added ack from Steven Rostedt v8..v9: * None v7..v8: * Updated the patch title [ Christoph Hellw

Re: [PATCH v11 5/6] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-06-11 Thread Vaibhav Jain
Dan Williams writes: > On Wed, Jun 10, 2020 at 5:10 AM Vaibhav Jain wrote: >> >> Dan Williams writes: >> >> > On Tue, Jun 9, 2020 at 10:54 AM Vaibhav Jain wrote: >> >> >> >> Thanks Dan for the consideration and taking time to look into

Re: [PATCH v11 5/6] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

2020-06-10 Thread Vaibhav Jain
Dan Williams writes: > On Tue, Jun 9, 2020 at 10:54 AM Vaibhav Jain wrote: >> >> Thanks Dan for the consideration and taking time to look into this. >> >> My responses below: >> >> Dan Williams writes: >> >> > On Mon, Jun 8, 2020 at 5:

Re: [PATCH v11 5/6] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

2020-06-09 Thread Vaibhav Jain
ve the system. BTW, we also suggest to use '--base' option to specify >> the >> base tree in git format-patch, please see >> https://stackoverflow.com/a/37406982] >> >> url: >> https://github.com/0day-ci/linux/commits/Vaibhav-Jain/powerpc-papr_scm

[PATCH v12 5/6] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

2020-06-08 Thread Vaibhav Jain
is called from papr_scm_ndctl() in case of a PDSM request is received via ND_CMD_CALL command from libnvdimm. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v11..v12: * Updated a misleading comment in 'papr_p

[PATCH v12 4/6] powerpc/papr_scm: Improve error logging and handling papr_scm_ndctl()

2020-06-08 Thread Vaibhav Jain
the patch also updates the 'default' add a debug log unknown 'cmd' values. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v11..v12: * Added ack from Ira v10..

  1   2   3   >