[PATCH v4 0/5] powerpc/perf: IMC trace-mode support

2019-04-15 Thread Anju T Sudhakar
The PMI interrupts count remains the same. Changelog: -- >From v3 -> v4: * trace_imc_refc is introduced. So that even if, core-imc is disabled, trace-imc can be used. * trace_imc_pmu_sched_task is removed and opal start/stop is invoked in trace_imc_event_ad

[PATCH v4 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2019-04-15 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH v4 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2019-04-15 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 fi

[PATCH v4 3/5] powerpc/perf: Add privileged access check for thread_imc

2019-04-15 Thread Anju T Sudhakar
From: Madhavan Srinivasan Add code to restrict user access to thread_imc pmu since some event report privilege level information. Fixes: f74c89bd80fb3 ('powerpc/perf: Add thread IMC PMU support') Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerp

[PATCH v4 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2019-04-15 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 104 ++ arch/powerpc/platforms/powernv/opal

[PATCH v4 5/5] powerpc/perf: Trace imc PMU functions

2019-04-15 Thread Anju T Sudhakar
Add PMU functions to support trace-imc. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 183 1 file changed, 183 insertions(+) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index

Re: [PATCH v4 0/5] powerpc/perf: IMC trace-mode support

2019-04-16 Thread Anju T Sudhakar
Hi, Kindly ignore this series, since patch 5/5 in this series doesn't incorporate the event-format change that I've done in v4 of this series. Apologies for the inconvenience. I will post the updated v5 soon. Thanks, Anju On 4/15/19 3:41 PM, Anju T Sudhakar wrote: IMC

[PATCH v4 0/5] powerpc/perf: IMC trace-mode support

2019-04-16 Thread Anju T Sudhakar
The PMI interrupts count remains the same. Changelog: -- >From v3 -> v4: * trace_imc_refc is introduced. So that even if, core-imc is disabled, trace-imc can be used. * trace_imc_pmu_sched_task is remo

[PATCH v4 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2019-04-16 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH v4 3/5] powerpc/perf: Add privileged access check for thread_imc

2019-04-16 Thread Anju T Sudhakar
From: Madhavan Srinivasan Add code to restrict user access to thread_imc pmu since some event report privilege level information. Fixes: f74c89bd80fb3 ('powerpc/perf: Add thread IMC PMU support') Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerp

[PATCH v4 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2019-04-16 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 fi

[PATCH v4 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2019-04-16 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 104 ++ arch/powerpc/platforms/powernv/opal

[PATCH v4 5/5] powerpc/perf: Trace imc PMU functions

2019-04-16 Thread Anju T Sudhakar
Add PMU functions to support trace-imc. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 205 +++- 1 file changed, 204 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc

Re: [PATCH v4 0/5] powerpc/perf: IMC trace-mode support

2019-04-16 Thread Anju T Sudhakar
On 4/16/19 3:14 PM, Anju T Sudhakar wrote: Hi, Kindly ignore this series, since patch 5/5 in this series doesn't incorporate the event-format change that I've done in v4 of this series. Apologies for the inconvenience. I will post the updated v5 soon. s/v5/v4 Thanks, Anj

[PATCH v3 1/2] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-02-27 Thread Anju T Sudhakar
at a time. i.e. to run any core-imc events, thread/trace imc events should not be enabled/monitored. Signed-off-by: Anju T Sudhakar --- Changes from v2->v3: - Addressed the off-line comments from Michael Ellerman - Optimized the *_event_init code path for trace, core and thread imc - Handled

[PATCH v3 2/2] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-02-27 Thread Anju T Sudhakar
enable imc-trace mode in kernel. The previous patch(1/2) in this series will address the mode switching issue by implementing a global lock, and will restrict the usage of accumulation and trace-mode at a time. Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 9 +---

[PATCH v4 1/2] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-03-12 Thread Anju T Sudhakar
at a time. i.e. to run any core-imc events, thread/trace imc events should not be enabled/monitored. Signed-off-by: Anju T Sudhakar --- Changes from v3->v4: - Added mutex lock for thread, core and trace imc cpu offline path. Changes from v2->v3: - Addressed the off-line comments from M

[PATCH v4 2/2] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-03-12 Thread Anju T Sudhakar
enable imc-trace mode in kernel. The previous patch(1/2) in this series will address the mode switching issue by implementing a global lock, and will restrict the usage of accumulation and trace-mode at a time. Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 9 +---

[PATCH v3] platforms/powernv: Avoid re-registration of imc debugfs directory

2019-11-26 Thread Anju T Sudhakar
he debugfs directory registration in the opal_imc_counters_probe() function, i.e invoke export_imc_mode_and_cmd() function from the probe function. Signed-off-by: Anju T Sudhakar --- Changes from v2 -> v3: * Invoke export_imc_mode_and_cmd(), which does the imc debugfs directory registration and d

[PATCH 1/2] tools/perf: set no_auxtrace for powerpc

2020-04-28 Thread Anju T Sudhakar
. Currently powerpc architecture is not having support for auxtrace. So as a workaround for this issue, set NO_AUXTRACE for powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch

[PATCH 0/2] powerpc/perf: Add support for perf extended regs in powerpc

2020-04-28 Thread Anju T Sudhakar
for this issue, patch 1/2 set NO_AUXTRACE for powerpc. (Any other solutions are welcome.) Patch 2/2 also add extended regs to sample_reg_mask in the tool side to use with `-I?` option. Anju T Sudhakar (2): tools/perf: set no_auxtrace for powerpc powerpc/perf: Add support for outputting extended

[PATCH 2/2] powerpc/perf: Add support for outputting extended regs in perf intr_regs

2020-04-28 Thread Anju T Sudhakar
: Anju T Sudhakar --- arch/powerpc/include/asm/perf_event_server.h | 5 +++ arch/powerpc/include/uapi/asm/perf_regs.h | 13 +++- arch/powerpc/perf/core-book3s.c | 1 + arch/powerpc/perf/perf_regs.c | 29 ++-- arch/powerpc/perf/power9-pmu.c

Re: [bug report] powerpc/perf: Add nest IMC PMU support

2018-10-24 Thread Anju T Sudhakar
Hi, On 10/18/18 3:03 PM, Dan Carpenter wrote: Hello Anju T Sudhakar, The patch 885dcd709ba9: "powerpc/perf: Add nest IMC PMU support" from Jul 19, 2017, leads to the following static checker warning: arch/powerpc/perf/imc-pmu.c:506 nest_imc_event_init() warn: '

[PATCH] powerpc/perf: Fix loop exit condition in nest_imc_event_init

2018-11-27 Thread Anju T Sudhakar
d-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 78514170cf71..e9dc771f3e3d 100644 --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -

[PATCH] powerpc/perf: Return accordingly on invalid chip-id in

2018-11-27 Thread Anju T Sudhakar
: 885dcd709ba91 ("powerpc/perf: Add nest IMC PMU support") Reviewed-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 6954636b16d1..78

[PATCH 2/4] powerpc/perf: Rearrange setting of ldbar for thread-imc

2018-11-28 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 file changed, 17 insertions(+), 11

[PATCH 1/4] powerpc/include: Add data structures and macros for IMC trace mode

2018-11-28 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH 3/4] powerpc/perf: Trace imc events detection and cpuhotplug

2018-11-28 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 91 +++ arch/powerpc/platforms/powernv/opal-imc.c | 3 + include/linux

[PATCH 4/4] powerpc/perf: Trace imc PMU functions

2018-11-28 Thread Anju T Sudhakar
Add PMU functions to support trace-imc. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 172 1 file changed, 172 insertions(+) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index d9ffe7f03f1e..18af7c3e2345 100644

[PATCH 0/4] powerpc/perf: IMC trace-mode support

2018-11-28 Thread Anju T Sudhakar
803803804804804804 804804804804804804803 803803803803803 1306803 803 Performance monitoring interrupts

[PATCH v2 0/5] powerpc/perf: IMC trace-mode support

2018-12-14 Thread Anju T Sudhakar
03 803803803803803 1306803 803 Performance monitoring interrupts The PMI interrupts count remains the same. Changelog: >From v1 -> v2 -- * Added priv

[PATCH v2 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2018-12-14 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH v2 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2018-12-14 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 91 +++ arch/powerpc/platforms/powernv/opal-imc.c | 3 + include/linux

[PATCH v2 3/5] powerpc/perf: Add privileged access check for thread_imc

2018-12-14 Thread Anju T Sudhakar
From: Madhavan Srinivasan Add code to restrict user access to thread_imc pmu since some event report privilege level information. Fixes: f74c89bd80fb3 ('powerpc/perf: Add thread IMC PMU support') Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerp

[PATCH v2 5/5] powerpc/perf: Trace imc PMU functions

2018-12-14 Thread Anju T Sudhakar
Add PMU functions to support trace-imc. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 175 1 file changed, 175 insertions(+) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 1f09265c8fb0..32ff0e449fca 100644

[PATCH v2 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2018-12-14 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 file changed, 17 insertions(+), 11

[PATCH] powerpc/imc: Dont create debugfs files for cpu-less nodes

2019-06-28 Thread Anju T Sudhakar
: Add debugfs interface for imc-mode and imc') Reported-by: Qian Cai Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal-imc.c

Re: power9 NUMA crash while reading debugfs imc_cmd

2019-06-28 Thread Anju T Sudhakar
On 6/28/19 9:04 AM, Qian Cai wrote: On Jun 27, 2019, at 11:12 PM, Michael Ellerman wrote: Qian Cai writes: Read of debugfs imc_cmd file for a memory-less node will trigger a crash below on this power9 machine which has the following NUMA layout. What type of machine is it? description:

[PATCH v2 1/3] tools/perf: Move kvm-stat header file from conditional inclusion to common include section

2019-07-18 Thread Anju T Sudhakar
. Signed-off-by: Anju T Sudhakar --- tools/perf/builtin-kvm.c | 2 +- tools/perf/util/kvm-stat.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index b33c83489120..5d2b34d290a3 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools

[PATCH v2 2/3] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-07-18 Thread Anju T Sudhakar
host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceedin

[PATCH v2 3/3] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-07-18 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util

Re: [PATCH v2] powerpc/imc: Dont create debugfs files for cpu-less nodes

2019-07-23 Thread Anju T Sudhakar
Hi Qian, On 7/16/19 12:11 AM, Qian Cai wrote: On Thu, 2019-07-11 at 14:53 +1000, Michael Ellerman wrote: Hi Maddy, Madhavan Srinivasan writes: diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c index 186109bdd41b..e04b20625cb9 100644 --- a/arch

Re: [RFC PATCH 3/4] powerpc/perf: fix imc allocation failure

2019-07-23 Thread Anju T Sudhakar
On 7/22/19 11:16 PM, Nicholas Piggin wrote: alloc_pages_node return value should be tested before applying page_address. Cc: Anju T Sudhakar Cc: Madhavan Srinivasan Signed-off-by: Nicholas Piggin --- Tested-by: Anju T Sudhakar

[PATCH v2] powerpc/perf: Fix loop exit condition in nest_imc_event_init

2018-12-17 Thread Anju T Sudhakar
Fixes: 885dcd709ba91 ( powerpc/perf: Add nest IMC PMU support) Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 2 +- arch/powerpc/platforms/powernv/opal-imc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc

[PATCH v3 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2019-02-06 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH v3 0/5] powerpc/perf: IMC trace-mode support

2019-02-06 Thread Anju T Sudhakar
03 803803803803803 1306803 803 Performance monitoring interrupts The PMI interrupts count remains the same. Changelog: >From v2 -> v3 -- * Redefined

[PATCH v3 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2019-02-06 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 fi

[PATCH v3 3/5] powerpc/perf: Add privileged access check for thread_imc

2019-02-06 Thread Anju T Sudhakar
From: Madhavan Srinivasan Add code to restrict user access to thread_imc pmu since some event report privilege level information. Fixes: f74c89bd80fb3 ('powerpc/perf: Add thread IMC PMU support') Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerp

[PATCH v3 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2019-02-06 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 91 +++ arch/powerpc/platforms/powernv/opal

[PATCH v3 5/5] powerpc/perf: Trace imc PMU functions

2019-02-06 Thread Anju T Sudhakar
Add PMU functions to support trace-imc and define the format for trace-imc events. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 197 +++- 1 file changed, 196 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH 1/2] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-01-20 Thread Anju T Sudhakar
enable imc-trace mode in kernel. The following patch in this series will address the mode switching issue by implementing a global lock, and will restrict the usage of accumulation and trace-mode at a time. Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 9 +--

[PATCH 2/2] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-01-20 Thread Anju T Sudhakar
at a time. i.e. to run any core-imc events, thread/trace imc events should not be enabled/monitored. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 177 +++- 1 file changed, 153 insertions(+), 24 deletions(-) diff --git a/arch/powerpc/perf/imc

[PATCH v2 0/5] Re-enable IMC trace-mode

2020-01-21 Thread Anju T Sudhakar
m crash). This patch series re-enables IMC trace mode and fixes the mode switching issue by global lock mechanism. Patch 3/5,4/5 and 5/5 provides a selftest to verify the global-lock mechanism. Changes from v1 -> v2: - - Added self test patches to the series. Anju T

[PATCH v2 1/5] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-01-21 Thread Anju T Sudhakar
enable imc-trace mode in kernel. The following patch in this series will address the mode switching issue by implementing a global lock, and will restrict the usage of accumulation and trace-mode at a time. Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 9 +--

[PATCH v2 4/5] selftest/powerpc/pmc: Support to include interface test for Memory Counter PMUs

2020-01-21 Thread Anju T Sudhakar
From: Madhavan Srinivasan Patch to add support to include interface tests for memory counter PMUs as part of selftest. These PMUs are primarily used to understand socket/chip/core resourage usage. In PowerNV envirnoment, the perf interface registered to access these counters are called "In Memory

[PATCH v2 5/5] selftest/powerpc/pmu: Testcase for imc global lock mechanism

2020-01-21 Thread Anju T Sudhakar
From: Madhavan Srinivasan Signed-off-by: Madhavan Srinivasan --- .../pmu/mem_counters/imc_global_lock_test.c | 49 ++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/pmu/mem_counters/imc_global_lock_test.c b/tools/testing/selfte

[PATCH v2 2/5] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-01-21 Thread Anju T Sudhakar
at a time. i.e. to run any core-imc events, thread/trace imc events should not be enabled/monitored. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 177 +++- 1 file changed, 153 insertions(+), 24 deletions(-) diff --git a/arch/powerpc/perf/imc

[PATCH v2 3/5] powerpc/perf: Add an interface sub-folder to imc pmu

2020-01-21 Thread Anju T Sudhakar
From: Madhavan Srinivasan Patch adds an interface attribute folder to imc pmu. This is intended to include pmu intreface capabilities which will be useful to userspace likes selftest testcases. Patch adds a "glob_lck" file to notify to userspace of global lock mechanism added to imc devices like

Re: [PATCH v5 07/10] powerpc/perf: open access for CAP_PERFMON privileged process

2020-01-22 Thread Anju T Sudhakar
to CAP_PERFMON capability. Providing the access under CAP_PERFMON capability singly, without the rest of CAP_SYS_ADMIN credentials, excludes chances to misuse the credentials and makes the operations more secure. Signed-off-by: Alexey Budankov --- Acked-by: Anju T Sudhakar

[PATCH] platform/powernv: Avoid re-registration of imc debugfs directory

2019-08-20 Thread Anju T Sudhakar
sting 'imc' directory, and do not invoke debugfs_create_dir(), if the debugfs interface for imc already exists. This patch is based on: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-July/192979.html Signed-off-by: Anju T Sudhakar Tested-by: Nageswara R Sastry --- arch/power

Re: [PATCH] platform/powernv: Avoid re-registration of imc debugfs directory

2019-08-20 Thread Anju T Sudhakar
Hi, On 8/21/19 10:16 AM, Oliver O'Halloran wrote: On Wed, Aug 21, 2019 at 2:10 PM Anju T Sudhakar wrote: export_imc_mode_and_cmd() function which creates the debugfs interface for imc-mode and imc-command, is invoked when each nest pmu units is registered. When the first nest pmu un

[PATCH v2] platform/powernv: Avoid re-registration of imc debugfs directory

2019-09-03 Thread Anju T Sudhakar
n existing 'imc' directory, and do not invoke debugfs_create_dir(), if the debugfs interface for imc already exists. This patch is based on: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-August/195898.html Signed-off-by: Anju T Sudhakar Tested-by: Nageswara R Sastry --- C

[PATCH] powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc.

2020-07-02 Thread Anju T Sudhakar
. Add support in kernel to use these bits to set the cpumode for each sample. Signed-off-by: Anju T Sudhakar --- arch/powerpc/include/asm/imc

[PATCH] powerpc/imc: Add documentation for IMC and trace-mode

2019-05-10 Thread Anju T Sudhakar
Documentation for IMC(In-Memory Collection Counters) infrastructure and trace-mode of IMC. Signed-off-by: Anju T Sudhakar --- Documentation/powerpc/imc.txt | 195 ++ 1 file changed, 195 insertions(+) create mode 100644 Documentation/powerpc/imc.txt diff --git a

[PATCH] powerpc/powernv: Return for invalid IMC domain

2019-05-20 Thread Anju T Sudhakar
ain before attempting a pmu registration. Fixes: 8f95faaac56c1 (`powerpc/powernv: Detect and create IMC device`) Reported-by: Pavaman Subramaniyam Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc

[PATCH] powerpc/perf: Use cpumask_last() to determine the

2019-05-20 Thread Anju T Sudhakar
last cpu in the mask goes offline. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 31fa753..fbfd6e7 100644 --- a/arch/powerpc/perf/imc

Re: [PATCH] powerpc/perf: Use cpumask_last() to determine the

2019-05-20 Thread Anju T Sudhakar
Hi, Somehow the subject of this patch didn't appear completely here. The Subject of this patch is as follows, `Subject [PATCH] powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units.` Thanks, Anju On 5/20/19 2:35 PM, Anju T Sudhakar wrote: Nest and cor

Re: [PATCH] powerpc/powernv: Return for invalid IMC domain

2019-05-22 Thread Anju T Sudhakar
Hi, On 5/21/19 5:18 PM, Michael Ellerman wrote: Anju T Sudhakar writes: Currently init_imc_pmu() can be failed either because an IMC unit with invalid domain(i.e an IMC node not supported by the kernel) is attempted a pmu-registration or something went wrong while registering a valid IMC unit

[PATCH 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-05-24 Thread Anju T Sudhakar
host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceedin

[PATCH 2/2] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-05-24 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util

[PATCH v2] powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units.

2019-06-09 Thread Anju T Sudhakar
migration will happen only when the first_cpu in the mask goes offline. Example: With the patch, Time taken to offline cpu from 175-88: real0m9.330s user0m0.110s sys 0m0.000s Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- Changes from v1: Modified the

[PATCH RESEND 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-06-09 Thread Anju T Sudhakar
host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceedin

[PATCH RESEND 2/2] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-06-09 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util

Re: [PATCH v2] powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units.

2019-06-11 Thread Anju T Sudhakar
Hi Leonardo, On 6/11/19 12:17 AM, Leonardo Bras wrote: On Mon, 2019-06-10 at 12:02 +0530, Anju T Sudhakar wrote: Nest and core imc(In-memory Collection counters) assigns a particular cpu as the designated target for counter data collection. During system boot, the first online cpu in a chip

Re: [PATCH v5 06/13] powerpc/perf: IMC pmu cpumask and cpu hotplug support

2017-03-27 Thread Anju T Sudhakar
: CPUHP_AP_PERF_POWERPC_NEST_ONLINE. Cc: Gautham R. Shenoy Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Cc: Anju T Sudhakar Signed-off-by: Hemant

Re: [PATCH 12/13] powerpc/perf: Thread imc cpuhotplug support

2017-03-27 Thread Anju T Sudhakar
On Thursday 23 March 2017 10:45 PM, Gautham R Shenoy wrote: Hi Maddy, Anju, On Thu, Mar 16, 2017 at 01:05:06PM +0530, Madhavan Srinivasan wrote: From: Anju T Sudhakar This patch adds support for thread IMC on cpuhotplug. When a cpu goes offline, the LDBAR for that cpu is disabled, and

Re: [PATCH v6 03/11] powerpc/powernv: Detect supported IMC units and its events

2017-04-06 Thread Anju T Sudhakar
Hi Stewart, Thanks for the review. On Thursday 06 April 2017 02:07 PM, Stewart Smith wrote: Madhavan Srinivasan writes: --- a/arch/powerpc/platforms/powernv/opal-imc.c +++ b/arch/powerpc/platforms/powernv/opal-imc.c @@ -33,6 +33,388 @@ +static void imc_pmu_setup(struct device_node *paren

Re: [PATCH v6 03/11] powerpc/powernv: Detect supported IMC units and its events

2017-04-17 Thread Anju T Sudhakar
Hi Michael, On Thursday 13 April 2017 05:13 PM, Michael Ellerman wrote: Anju T Sudhakar writes: On Thursday 06 April 2017 02:07 PM, Stewart Smith wrote: Madhavan Srinivasan writes: --- a/arch/powerpc/platforms/powernv/opal-imc.c +++ b/arch/powerpc/platforms/powernv/opal-imc.c @@ -33,6

[PATCH v7 00/10] IMC Instrumentation Support

2017-04-18 Thread Anju T Sudhakar
ts because of the changed format of the IMC DTS file (Patch 3). - Implemented the two TODOs to include core and thread IMC support with this patchset (Patches 7 through 10). - Changed the CPU hotplug code of Nest IMC PMUs to include a new state CPUHP_AP_PERF_POWERPC_NEST_ONLINE (Patch 6).

[PATCH v7 01/10] powerpc/powernv: Data structure and macros definitions for IMC

2017-04-18 Thread Anju T Sudhakar
From: Hemant Kumar Create a new header file to add the data structures and macros needed for In-Memory Collection (IMC) counter support. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h | 95

[PATCH v7 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-04-18 Thread Anju T Sudhakar
designated as new cpu to read counters. For this purpose, we introduce a new state : CPUHP_AP_PERF_POWERPC_NEST_ONLINE. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h | 4 + arch/powerpc/include/asm

[PATCH v7 8/10] powerpc/powernv: Thread IMC events detection

2017-04-18 Thread Anju T Sudhakar
Patch adds support for detection of thread IMC events. It adds a new domain IMC_DOMAIN_THREAD and it is determined with the help of the compatibility string "ibm,imc-counters-thread" based on the IMC device tree. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by

[PATCH v7 9/10] powerpc/perf: Thread IMC PMU functions

2017-04-18 Thread Anju T Sudhakar
erent cpus. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h| 5 + arch/powerpc/perf/imc-pmu.c | 201 ++ arch/powerpc/platforms/powernv/opal-imc.c | 3 + 3

[PATCH v7 03/10] powerpc/powernv: Detect supported IMC units and its events

2017-04-18 Thread Anju T Sudhakar
y event, disable that unit and continue setting up the rest of them. Signed-off-by: Hemant Kumar Signed-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/platforms/powernv/opal-imc.c | 413 ++ 1 file changed, 413 insertions(+) diff --g

[PATCH v7 02/10] powerpc/powernv: Autoload IMC device driver module

2017-04-18 Thread Anju T Sudhakar
s done in subsequent patches). Patch also adds a CONFIG_HV_PERF_IMC_CTRS for the IMC driver. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/platforms/powernv/Kconfig| 10 +++ arch/powerpc/platforms/powernv/Makefile | 1 + ar

[PATCH v7 06/10] powerpc/powernv: Core IMC events detection

2017-04-18 Thread Anju T Sudhakar
From: Hemant Kumar This patch adds support for detection of core IMC events along with the Nest IMC events. It adds a new domain IMC_DOMAIN_CORE and its determined with the help of the compatibility string "ibm,imc-counters-core" based on the IMC device tree. Signed-off-by: Anju

[PATCH v7 10/10] powerpc/perf: Thread imc cpuhotplug support

2017-04-18 Thread Anju T Sudhakar
CPUHP_AP_PERF_POWERPC_THREADIMC_ONLINE is added to the list of existing states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 32 +++- include/linux/cpuhotplug.h | 1 + 2 files changed, 28 insertions

[PATCH v7 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging

2017-04-18 Thread Anju T Sudhakar
d-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h | 7 + arch/powerpc/include/asm/opal-api.h| 10 +- arch/powerpc/include/asm/opal.h| 2 + arch/powerpc/perf/imc-pmu.c

[PATCH v7 4/10] powerpc/perf: Add generic IMC pmu groupand event functions

2017-04-18 Thread Anju T Sudhakar
tup format attribute and to register imc pmus. Add a event_init function for nest_imc events. Since, the IMC counters' data are periodically fed to a memory location, the functions to read/update, start/stop, add/del can be generic and can be used by all IMC PMU units. Signed-off-by: Anju T S

[PATCH v8 00/10] IMC Instrumentation Support

2017-05-04 Thread Anju T Sudhakar
ged the events parser code to discover the PMU and events because of the changed format of the IMC DTS file (Patch 3). - Implemented the two TODOs to include core and thread IMC support with this patchset (Patches 7 through 10). - Changed the CPU hotplug code of Nest IMC PMUs to includ

[PATCH v8 02/10] powerpc/powernv: Autoload IMC device driver module

2017-05-04 Thread Anju T Sudhakar
s done in subsequent patches). Patch also adds a CONFIG_HV_PERF_IMC_CTRS for the IMC driver. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/platforms/powernv/Kconfig| 10 +++ arch/powerpc/platforms/powernv/Makefile | 1 + ar

[PATCH v8 01/10] powerpc/powernv: Data structure and macros definitions for IMC

2017-05-04 Thread Anju T Sudhakar
From: Hemant Kumar Create a new header file to add the data structures and macros needed for In-Memory Collection (IMC) counter support. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h | 95

[PATCH v8 03/10] powerpc/powernv: Detect supported IMC units and its events

2017-05-04 Thread Anju T Sudhakar
ent, disable that unit and continue setting up the rest of them. Signed-off-by: Hemant Kumar Signed-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/platforms/powernv/opal-imc.c | 413 ++ 1 file changed, 413 insertions(+) diff --git a/arch

[PATCH v8 04/10] powerpc/perf: Add generic IMC pmu groupand event functions

2017-05-04 Thread Anju T Sudhakar
tup format attribute and to register imc pmus. Add a event_init function for nest_imc events. Since, the IMC counters' data are periodically fed to a memory location, the functions to read/update, start/stop, add/del can be generic and can be used by all IMC PMU units. Signed-off-by: Anju T S

[PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-04 Thread Anju T Sudhakar
designated as new cpu to read counters. For this purpose, we introduce a new state : CPUHP_AP_PERF_POWERPC_NEST_ONLINE. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h | 4 + arch/powerpc/include/asm

[PATCH v8 08/10] powerpc/powernv: Thread IMC events detection

2017-05-04 Thread Anju T Sudhakar
Patch adds support for detection of thread IMC events. It adds a new domain IMC_DOMAIN_THREAD and it is determined with the help of the compatibility string "ibm,imc-counters-thread" based on the IMC device tree. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by

[PATCH v8 06/10] powerpc/powernv: Core IMC events detection

2017-05-04 Thread Anju T Sudhakar
From: Hemant Kumar This patch adds support for detection of core IMC events along with the Nest IMC events. It adds a new domain IMC_DOMAIN_CORE and its determined with the help of the compatibility string "ibm,imc-counters-core" based on the IMC device tree. Signed-off-by: Anju

[PATCH v8 10/10] powerpc/perf: Thread imc cpuhotplug support

2017-05-04 Thread Anju T Sudhakar
CPUHP_AP_PERF_POWERPC_THREADIMC_ONLINE is added to the list of existing states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 32 +++- include/linux/cpuhotplug.h | 1 + 2 files changed, 28 insertions

[PATCH v8 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging

2017-05-04 Thread Anju T Sudhakar
d-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h| 7 + arch/powerpc/perf/imc-pmu.c | 380 +- arch/powerpc/platforms/powernv/opal-imc.c | 7 + include/linux/cpuhotplug.h| 1

[PATCH v8 09/10] powerpc/perf: Thread IMC PMU functions

2017-05-04 Thread Anju T Sudhakar
erent cpus. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h| 5 + arch/powerpc/perf/imc-pmu.c | 209 +- arch/powerpc/platforms/powernv/opal-imc.c | 3 + 3

  1   2   3   >