Re: [RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-24 Thread David Gibson
On Sat, May 22, 2021 at 09:01:26AM +0530, Vaibhav Jain wrote: > Thanks for looking into this patch David and Groug, > > David Gibson writes: > > On Sat, May 15, 2021 at 01:07:59PM +0530, Vaibhav Jain wrote: > >> Add support for H_SCM_PERFORMANCE_STATS described at [1] for > >> spapr nvdimms.

Re: [RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-21 Thread Vaibhav Jain
Thanks for looking into this patch David and Groug, David Gibson writes: > On Sat, May 15, 2021 at 01:07:59PM +0530, Vaibhav Jain wrote: >> Add support for H_SCM_PERFORMANCE_STATS described at [1] for >> spapr nvdimms. This enables guest to fetch performance stats[2] like >> expected life of an

Re: [RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-17 Thread David Gibson
On Mon, May 17, 2021 at 09:55:31AM +0200, Greg Kurz wrote: > On Mon, 17 May 2021 16:23:56 +1000 > David Gibson wrote: > > > On Sat, May 15, 2021 at 01:07:59PM +0530, Vaibhav Jain wrote: > [...] > > > +rc = (result == MEMTX_OK) ? > > > +scm_perf_check_rr_buffer(perfstats, addr, size,

Re: [RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-17 Thread Greg Kurz
On Mon, 17 May 2021 16:23:56 +1000 David Gibson wrote: > On Sat, May 15, 2021 at 01:07:59PM +0530, Vaibhav Jain wrote: [...] > > +rc = (result == MEMTX_OK) ? > > +scm_perf_check_rr_buffer(perfstats, addr, size, _stats) : > > +H_PRIVILEGE; > > This is a bit cryptic. Just

Re: [RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-17 Thread David Gibson
On Sat, May 15, 2021 at 01:07:59PM +0530, Vaibhav Jain wrote: > Add support for H_SCM_PERFORMANCE_STATS described at [1] for > spapr nvdimms. This enables guest to fetch performance stats[2] like > expected life of an nvdimm ('MemLife ') etc and display them to the > user. Linux kernel support for

[RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-15 Thread Vaibhav Jain
Add support for H_SCM_PERFORMANCE_STATS described at [1] for spapr nvdimms. This enables guest to fetch performance stats[2] like expected life of an nvdimm ('MemLife ') etc and display them to the user. Linux kernel support for fetching these performance stats and exposing them to the user-space