nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v4 0/4]  Add perf interface to expose nvdimm
@ 2021-09-03  5:09 Kajol Jain
  2021-09-03  5:09 ` [RESEND PATCH v4 1/4] drivers/nvdimm: Add nvdimm pmu structure Kajol Jain
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Kajol Jain @ 2021-09-03  5:09 UTC (permalink / raw)
  To: mpe, linuxppc-dev, nvdimm, linux-kernel, peterz, dan.j.williams,
	ira.weiny, vishal.l.verma
  Cc: maddy, santosh, aneesh.kumar, vaibhav, atrajeev, tglx, kjain, rnsastry

Patchset adds performance stats reporting support for nvdimm.
Added interface includes support for pmu register/unregister
functions. A structure is added called nvdimm_pmu to be used for
adding arch/platform specific data such as supported events, cpumask
pmu event functions like event_init/add/read/del.
User could use the standard perf tool to access perf
events exposed via pmu.

Added implementation to expose IBM pseries platform nmem*
device performance stats using this interface.

Result from power9 pseries lpar with 2 nvdimm device:
command:# perf list nmem
  nmem0/cchrhcnt/                                    [Kernel PMU event]
  nmem0/cchwhcnt/                                    [Kernel PMU event]
  nmem0/critrscu/                                    [Kernel PMU event]
  nmem0/ctlresct/                                    [Kernel PMU event]
  nmem0/ctlrestm/                                    [Kernel PMU event]
  nmem0/fastwcnt/                                    [Kernel PMU event]
  nmem0/hostlcnt/                                    [Kernel PMU event]
  nmem0/hostldur/                                    [Kernel PMU event]
  nmem0/hostscnt/                                    [Kernel PMU event]
  nmem0/hostsdur/                                    [Kernel PMU event]
  nmem0/medrcnt/                                     [Kernel PMU event]
  nmem0/medrdur/                                     [Kernel PMU event]
  nmem0/medwcnt/                                     [Kernel PMU event]
  nmem0/medwdur/                                     [Kernel PMU event]
  nmem0/memlife/                                     [Kernel PMU event]
  nmem0/noopstat/                                    [Kernel PMU event]
  nmem0/ponsecs/                                     [Kernel PMU event]
  nmem1/cchrhcnt/                                    [Kernel PMU event]
  nmem1/cchwhcnt/                                    [Kernel PMU event]
  nmem1/critrscu/                                    [Kernel PMU event]
  ...
  nmem1/noopstat/                                    [Kernel PMU event]
  nmem1/ponsecs/                                     [Kernel PMU event]

Patch1:
        Introduces the nvdimm_pmu structure
Patch2:
	Adds common interface to add arch/platform specific data
	includes supported events, pmu event functions. It also
	adds code for cpu hotplug support.
Patch3:
        Add code in arch/powerpc/platform/pseries/papr_scm.c to expose
        nmem* pmu. It fills in the nvdimm_pmu structure with event attrs
        cpumask andevent functions and then registers the pmu by adding
        callbacks to register_nvdimm_pmu.
Patch4:
        Sysfs documentation patch

Changelog
---
v3 -> v4
- Rebase code on top of current papr_scm code without any logical
  changes.

- Added Acked-by tag from Peter Zijlstra and Reviewed by tag
  from Madhavan Srinivasan.

- Link to the patchset v3: https://lkml.org/lkml/2021/6/17/605

v2 -> v3
- Added Tested-by tag.

- Fix nvdimm mailing list in the ABI Documentation.

- Link to the patchset v2: https://lkml.org/lkml/2021/6/14/25

v1 -> v2
- Fix hotplug code by adding pmu migration call
  incase current designated cpu got offline. As
  pointed by Peter Zijlstra.

- Removed the retun -1 part from cpu hotplug offline
  function.

- Link to the patchset v1: https://lkml.org/lkml/2021/6/8/500

Kajol Jain (4):
  drivers/nvdimm: Add nvdimm pmu structure
  drivers/nvdimm: Add perf interface to expose nvdimm performance stats
  powerpc/papr_scm: Add perf interface support
  powerpc/papr_scm: Document papr_scm sysfs event format entries

 Documentation/ABI/testing/sysfs-bus-papr-pmem |  31 ++
 arch/powerpc/include/asm/device.h             |   5 +
 arch/powerpc/platforms/pseries/papr_scm.c     | 365 ++++++++++++++++++
 drivers/nvdimm/Makefile                       |   1 +
 drivers/nvdimm/nd_perf.c                      | 230 +++++++++++
 include/linux/nd.h                            |  46 +++
 6 files changed, 678 insertions(+)
 create mode 100644 drivers/nvdimm/nd_perf.c

-- 
2.26.2


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-09-15  4:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03  5:09 [RESEND PATCH v4 0/4] Add perf interface to expose nvdimm Kajol Jain
2021-09-03  5:09 ` [RESEND PATCH v4 1/4] drivers/nvdimm: Add nvdimm pmu structure Kajol Jain
2021-09-07 21:59   ` Dan Williams
2021-09-09  7:55     ` kajoljain
2021-09-15  4:08       ` Dan Williams
2021-09-15  4:11         ` Dan Williams
2021-09-03  5:09 ` [RESEND PATCH v4 2/4] drivers/nvdimm: Add perf interface to expose nvdimm performance stats Kajol Jain
2021-09-03 12:32   ` kernel test robot
2021-09-03 15:19   ` kernel test robot
2021-09-04  6:38     ` kajoljain
2021-09-03 15:19   ` [RFC PATCH] drivers/nvdimm: nvdimm_pmu_free_hotplug_memory() can be static kernel test robot
2021-09-04  6:39     ` kajoljain
2021-09-03  5:09 ` [RESEND PATCH v4 3/4] powerpc/papr_scm: Add perf interface support Kajol Jain
2021-09-03  5:09 ` [RESEND PATCH v4 4/4] powerpc/papr_scm: Document papr_scm sysfs event format entries Kajol Jain
2021-09-08  1:03   ` Dan Williams
2021-09-09  8:03     ` kajoljain

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).