[PATCH 09/12] x86/cqm: Add RMID reuse

2017-01-06 Thread Vikas Shivappa
use the RMIDs that are freed. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 107 1 file changed, 107 insertions(+) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c index e1765e3

[PATCH 08/12] x86/cqm: Add support for monitoring task and cgroup together

2017-01-06 Thread Vikas Shivappa
From: Vikas Shivappa<vikas.shiva...@intel.com> This patch adds support to monitor a cgroup x and a task p1 when p1 is part of cgroup x. Since we cannot write two RMIDs during sched in the driver handles this. This patch introduces a u32 *rmid in the task_struck which keeps track of the

[PATCH 09/12] x86/cqm: Add RMID reuse

2017-01-06 Thread Vikas Shivappa
use the RMIDs that are freed. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 107 1 file changed, 107 insertions(+) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c index e1765e3..92efe12 100644 --- a/arch/x86/events/in

[PATCH 08/12] x86/cqm: Add support for monitoring task and cgroup together

2017-01-06 Thread Vikas Shivappa
From: Vikas Shivappa This patch adds support to monitor a cgroup x and a task p1 when p1 is part of cgroup x. Since we cannot write two RMIDs during sched in the driver handles this. This patch introduces a u32 *rmid in the task_struck which keeps track of the RMIDs associated with the task

[PATCH 08/14] x86/cqm: Add support for monitoring task and cgroup together

2016-12-16 Thread Vikas Shivappa
MSR read(for task p1): As any other cqm task event read(for the cgroup x): When counting for cgroup, the taskmon list is traversed and the corresponding RMID counts are added. Tests: Monitoring a cgroup x and a task with in the cgroup x should work. Patch modified/refactored by Vikas Shivappa <

[PATCH 09/14] x86/cqm: Add Continuous cgroup monitoring

2016-12-16 Thread Vikas Shivappa
continuously without perf by toggling the new cont_mon file in the cgroup. Patch is based on David Carrillo-Cisneros <davi...@google.com> patches in cqm2 series. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel

[PATCH 08/14] x86/cqm: Add support for monitoring task and cgroup together

2016-12-16 Thread Vikas Shivappa
any other cqm task event read(for the cgroup x): When counting for cgroup, the taskmon list is traversed and the corresponding RMID counts are added. Tests: Monitoring a cgroup x and a task with in the cgroup x should work. Patch modified/refactored by Vikas Shivappa to support recycling remo

[PATCH 09/14] x86/cqm: Add Continuous cgroup monitoring

2016-12-16 Thread Vikas Shivappa
continuously without perf by toggling the new cont_mon file in the cgroup. Patch is based on David Carrillo-Cisneros patches in cqm2 series. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 119 ++-- 1 file changed, 114 insertions(+), 5 deletions

[PATCH 05/14] x86/cqm,perf/core: Cgroup support prepare

2016-12-16 Thread Vikas Shivappa
before. Cgroup still doesnt work but we did the prep to get it to work Patch modified/refactored by Vikas Shivappa <vikas.shiva...@linux.intel.com> to support recycling removal. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 19 +++

[PATCH 07/14] x86/rdt,cqm: Scheduling support update

2016-12-16 Thread Vikas Shivappa
com> patches in cqm2 series. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 46 +-- arch/x86/include/asm/intel_pqr_common.h | 38 + arch/x86/include/asm/intel_rdt.h | 39 - arch/x86

[PATCH 12/14] perf/core,x86/cqm: Add read for Cgroup events,per pkg reads.

2016-12-16 Thread Vikas Shivappa
s in cqm2 series. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 1 + include/linux/perf_event.h | 19 --- kernel/events/core.c| 16 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/arch/x

[PATCH 13/14] perf/stat: fix bug in handling events in error state

2016-12-16 Thread Vikas Shivappa
fixes this problem by modifying read_counters() to mark the event as not scaled (scaled = -1) to force the printout routine to show . Signed-off-by: Stephane Eranian <eran...@google.com> Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- tools/perf/builtin-stat.c | 12 ++

[PATCH 06/14] x86/cqm: Add cgroup hierarchical monitoring support

2016-12-16 Thread Vikas Shivappa
cgroup->arch_info: css_alloc, css_free, event terminate, init hold mutex. Tests: Cgroup monitoring should work. Monitoring multiple cgroups in the same hierarchy works. monitoring cgroup and a task within same cgroup doesnt work yet. Patch modified/refactored by Vikas Shivappa <vikas.shiva...@lin

[PATCH 05/14] x86/cqm,perf/core: Cgroup support prepare

2016-12-16 Thread Vikas Shivappa
but we did the prep to get it to work Patch modified/refactored by Vikas Shivappa to support recycling removal. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 19 ++- arch/x86/include/asm/perf_event.h | 32 include/linux

[PATCH 07/14] x86/rdt,cqm: Scheduling support update

2016-12-16 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 46 +-- arch/x86/include/asm/intel_pqr_common.h | 38 + arch/x86/include/asm/intel_rdt.h | 39 - arch/x86/include/asm/intel_rdt_common.h | 13 + arch/x86/include/asm

[PATCH 12/14] perf/core,x86/cqm: Add read for Cgroup events,per pkg reads.

2016-12-16 Thread Vikas Shivappa
off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 1 + include/linux/perf_event.h | 19 --- kernel/events/core.c| 16 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c index e0d4

[PATCH 13/14] perf/stat: fix bug in handling events in error state

2016-12-16 Thread Vikas Shivappa
read_counters() to mark the event as not scaled (scaled = -1) to force the printout routine to show . Signed-off-by: Stephane Eranian Signed-off-by: Vikas Shivappa --- tools/perf/builtin-stat.c | 12 +--- tools/perf/util/evsel.c | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions

[PATCH 06/14] x86/cqm: Add cgroup hierarchical monitoring support

2016-12-16 Thread Vikas Shivappa
loc, css_free, event terminate, init hold mutex. Tests: Cgroup monitoring should work. Monitoring multiple cgroups in the same hierarchy works. monitoring cgroup and a task within same cgroup doesnt work yet. Patch modified/refactored by Vikas Shivappa to support recycling removal. Signed-

[PATCH 10/14] x86/cqm: Add RMID reuse

2016-12-16 Thread Vikas Shivappa
use the RMIDs that are freed. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 107 +++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cq

[PATCH 14/14] perf/stat: revamp read error handling, snapshot and per_pkg events

2016-12-16 Thread Vikas Shivappa
ephane Eranian <eran...@google.com> Signed-off-by: David Carrillo-Cisneros <davi...@google.com> Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- tools/perf/builtin-stat.c | 36 +++--- tools/perf/util/counts.h | 19 ++ tools/

[PATCH 10/14] x86/cqm: Add RMID reuse

2016-12-16 Thread Vikas Shivappa
use the RMIDs that are freed. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 107 +++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c index 73f566a..85162aa 100644 --- a/a

[PATCH 14/14] perf/stat: revamp read error handling, snapshot and per_pkg events

2016-12-16 Thread Vikas Shivappa
-by: David Carrillo-Cisneros Signed-off-by: Vikas Shivappa --- tools/perf/builtin-stat.c | 36 +++--- tools/perf/util/counts.h | 19 ++ tools/perf/util/evsel.c | 49 --- tools/perf/util/evsel.h | 8

[PATCH 03/14] x86/rdt: Add rdt common/cqm compile option

2016-12-16 Thread Vikas Shivappa
Add a compile option INTEL_RDT which enables common code for all RDT(Resource director technology) and a specific INTEL_RDT_M which enables code for RDT monitoring. CQM(cache quality monitoring) and mbm(memory b/w monitoring) are part of Intel RDT monitoring. Signed-off-by: Vikas Shivappa

[PATCH 11/14] x86/cqm: Add failure on open and read

2016-12-16 Thread Vikas Shivappa
and such cgroups are part of large number of cgroups which are monitored - that way we donot overuse RMIDs. Patch is based on David Carrillo-Cisneros <davi...@google.com> patches in cqm2 series. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c

[PATCH 04/14] x86/cqm: Add Per pkg rmid support

2016-12-16 Thread Vikas Shivappa
,put_rmid, perf start, terminate Tests: RMIDs available increase by x times where x is number of sockets and the usage is dynamic so we save more. Patch is based on David Carrillo-Cisneros <davi...@google.com> patches in cqm2 series. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.

[PATCH 02/14] x86/cqm: Remove cqm recycling/conflict handling

2016-12-16 Thread Vikas Shivappa
Vikas<vikas.shiva...@linux.intel.com> to only remove recycling parts from code and edit commit message. Tests: The cqm should either gives correct numbers for task events or just throw error that its run out of RMIDs. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arc

[PATCH 03/14] x86/rdt: Add rdt common/cqm compile option

2016-12-16 Thread Vikas Shivappa
Add a compile option INTEL_RDT which enables common code for all RDT(Resource director technology) and a specific INTEL_RDT_M which enables code for RDT monitoring. CQM(cache quality monitoring) and mbm(memory b/w monitoring) are part of Intel RDT monitoring. Signed-off-by: Vikas Shivappa

[PATCH 11/14] x86/cqm: Add failure on open and read

2016-12-16 Thread Vikas Shivappa
and such cgroups are part of large number of cgroups which are monitored - that way we donot overuse RMIDs. Patch is based on David Carrillo-Cisneros patches in cqm2 series. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 145 +--- arch/x86/events

[PATCH 04/14] x86/cqm: Add Per pkg rmid support

2016-12-16 Thread Vikas Shivappa
,put_rmid, perf start, terminate Tests: RMIDs available increase by x times where x is number of sockets and the usage is dynamic so we save more. Patch is based on David Carrillo-Cisneros patches in cqm2 series. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 340

[PATCH 02/14] x86/cqm: Remove cqm recycling/conflict handling

2016-12-16 Thread Vikas Shivappa
parts from code and edit commit message. Tests: The cqm should either gives correct numbers for task events or just throw error that its run out of RMIDs. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 647 ++-- 1 file changed, 30 insertions

[PATCH V4 00/14] Cqm2: Intel Cache Monitoring fixes and enhancements

2016-12-16 Thread Vikas Shivappa
Another attempt for cqm2 series- The current upstream cqm(Cache monitoring) has major issues which make the feature almost unusable which this series tries to fix and also address Thomas comments on previous versions of the cqm2 patch series to better document what we are trying to fix. Patch is

[PATCH 01/14] x86/cqm: Intel Resource Monitoring Documentation

2016-12-16 Thread Vikas Shivappa
Add documentation of usage of cqm and mbm events, continuous monitoring, lazy and non-lazy monitoring. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- Documentation/x86/intel_rdt_mon_ui.txt | 91 ++ 1 file changed, 91 insertions(+) creat

[PATCH V4 00/14] Cqm2: Intel Cache Monitoring fixes and enhancements

2016-12-16 Thread Vikas Shivappa
Another attempt for cqm2 series- The current upstream cqm(Cache monitoring) has major issues which make the feature almost unusable which this series tries to fix and also address Thomas comments on previous versions of the cqm2 patch series to better document what we are trying to fix. Patch is

[PATCH 01/14] x86/cqm: Intel Resource Monitoring Documentation

2016-12-16 Thread Vikas Shivappa
Add documentation of usage of cqm and mbm events, continuous monitoring, lazy and non-lazy monitoring. Signed-off-by: Vikas Shivappa --- Documentation/x86/intel_rdt_mon_ui.txt | 91 ++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/x86

[PATCH 2/3] perf/x86/mbm: Fix mbm counting for RMID reuse

2016-05-06 Thread Vikas Shivappa
e(rmid) //returns current total_bytes count: // MBM right now uses count instead of read cur_count = update_sample(rmid) event->count += cur_count - event->prev_count event->prev_count = cur_count Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/ev

[PATCH 1/3] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-05-06 Thread Vikas Shivappa
instance is seeing. This patch tries to fix the issue by saving the count for all the events in the same event group. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 24 insertions(

[PATCH 1/3] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-05-06 Thread Vikas Shivappa
instance is seeing. This patch tries to fix the issue by saving the count for all the events in the same event group. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/arch

[PATCH 2/3] perf/x86/mbm: Fix mbm counting for RMID reuse

2016-05-06 Thread Vikas Shivappa
e(rmid) //returns current total_bytes count: // MBM right now uses count instead of read cur_count = update_sample(rmid) event->count += cur_count - event->prev_count event->prev_count = cur_count Signed-off-by: Vikas Shivappa --- arch/x86/events/i

[PATCH V2 0/3] Urgent fixes for Intel CQM/MBM counting

2016-05-06 Thread Vikas Shivappa
Sending some urgent fixes for the MBM(memory b/w monitoring) which is upstreamed from 4.6-rc1. Patches apply on 4.6-rc6. CQM and MBM counters reported some incorrect counts for different scenarios like interval mode or for multiple perf instances. A second attempt to send V2 as per Peter

[PATCH 3/3] perf/x86/mbm: Fix mbm counting during RMID recycling

2016-05-06 Thread Vikas Shivappa
ed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c index a98d841..f91a172 100644 --

[PATCH V2 0/3] Urgent fixes for Intel CQM/MBM counting

2016-05-06 Thread Vikas Shivappa
Sending some urgent fixes for the MBM(memory b/w monitoring) which is upstreamed from 4.6-rc1. Patches apply on 4.6-rc6. CQM and MBM counters reported some incorrect counts for different scenarios like interval mode or for multiple perf instances. A second attempt to send V2 as per Peter

[PATCH 3/3] perf/x86/mbm: Fix mbm counting during RMID recycling

2016-05-06 Thread Vikas Shivappa
ed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c index a98d841..f91a172 100644 --- a/arch/x86/events/intel/cqm.c +++ b/ar

Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-05-03 Thread Vikas Shivappa
On Tue, 3 May 2016, Peter Zijlstra wrote: On Mon, Apr 25, 2016 at 02:12:09PM -0700, Vikas Shivappa wrote: start: prev_count = read_hw_counter(); I am assuming this means we keep the prev_count when event is initialized. This is done in the mbm_init which calls update_sample

Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-05-03 Thread Vikas Shivappa
On Tue, 3 May 2016, Peter Zijlstra wrote: On Mon, Apr 25, 2016 at 02:12:09PM -0700, Vikas Shivappa wrote: start: prev_count = read_hw_counter(); I am assuming this means we keep the prev_count when event is initialized. This is done in the mbm_init which calls update_sample

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
all the cases like context swith to a pid2 which is not monitored.. (assume event1 still exists) On Fri, Apr 29, 2016 at 2:32 PM Vikas Shivappa <vikas.shiva...@linux.intel.com> wrote: On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: if __intel_cqm_no_event_sched_in does nothing, the PQR_

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
all the cases like context swith to a pid2 which is not monitored.. (assume event1 still exists) On Fri, Apr 29, 2016 at 2:32 PM Vikas Shivappa wrote: On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: if __intel_cqm_no_event_sched_in does nothing, the PQR_ASSOC msr is still updated if state-&g

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
On Fri, Apr 29, 2016 at 2:01 PM, Vikas Shivappa <vikas.shiva...@linux.intel.com> wrote: On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: Not sure I see the problem you point here. In step 3, PQR_ASSOC is updated with RMID1, __pqr_update is the one called using the scheduler hook, righ

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
On Fri, Apr 29, 2016 at 2:01 PM, Vikas Shivappa wrote: On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: Not sure I see the problem you point here. In step 3, PQR_ASSOC is updated with RMID1, __pqr_update is the one called using the scheduler hook, right after perf sched_in . On Fri, Apr 29

Re: [PATCH 00/32] 2nd Iteration of Cache QoS Monitoring support.

2016-04-29 Thread Vikas Shivappa
On Thu, 28 Apr 2016, David Carrillo-Cisneros wrote: This series introduces the next iteration of kernel support for the Cache QoS Monitoring (CQM) technology available in Intel Xeon processors. Wondering what is the kernel version this compiles on ? Thanks, Vikas One of the main

Re: [PATCH 00/32] 2nd Iteration of Cache QoS Monitoring support.

2016-04-29 Thread Vikas Shivappa
On Thu, 28 Apr 2016, David Carrillo-Cisneros wrote: This series introduces the next iteration of kernel support for the Cache QoS Monitoring (CQM) technology available in Intel Xeon processors. Wondering what is the kernel version this compiles on ? Thanks, Vikas One of the main

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: Not sure I see the problem you point here. In step 3, PQR_ASSOC is updated with RMID1, __pqr_update is the one called using the scheduler hook, right after perf sched_in . On Fri, Apr 29, 2016 at 1:25 PM, Vikas Shivappa <vikas.sh

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: Not sure I see the problem you point here. In step 3, PQR_ASSOC is updated with RMID1, __pqr_update is the one called using the scheduler hook, right after perf sched_in . On Fri, Apr 29, 2016 at 1:25 PM, Vikas Shivappa wrote: On Thu

Re: [PATCH 09/32] perf/x86/intel/cqm: add per-package RMIDs, data and locks

2016-04-29 Thread Vikas Shivappa
@@ -27,5 +27,7 @@ struct intel_pqr_state { DECLARE_PER_CPU(struct intel_pqr_state, pqr_state); +#define PQR_MAX_NR_PKGS8 topology_max_packages() + #endif #endif -- 2.8.0.rc3.226.g39d4020

Re: [PATCH 09/32] perf/x86/intel/cqm: add per-package RMIDs, data and locks

2016-04-29 Thread Vikas Shivappa
@@ -27,5 +27,7 @@ struct intel_pqr_state { DECLARE_PER_CPU(struct intel_pqr_state, pqr_state); +#define PQR_MAX_NR_PKGS8 topology_max_packages() + #endif #endif -- 2.8.0.rc3.226.g39d4020

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
On Thu, 28 Apr 2016, David Carrillo-Cisneros wrote: Allow monitored cgroups to update the PQR MSR during task switch even without an associated perf_event. The package RMID for the current monr associated with a monitored cgroup is written to hw during task switch (after perf_events is run)

Re: [PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-29 Thread Vikas Shivappa
On Thu, 28 Apr 2016, David Carrillo-Cisneros wrote: Allow monitored cgroups to update the PQR MSR during task switch even without an associated perf_event. The package RMID for the current monr associated with a monitored cgroup is written to hw during task switch (after perf_events is run)

Re: [PATCH 25/32] sched: introduce the finish_arch_pre_lock_switch() scheduler hook

2016-04-29 Thread Vikas Shivappa
On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: (Re-sending in plain text) This hook is used in the following patch in the series to write to PQR_ASSOC_MSR, a msr that is utilized both by CQM/CMT and by CAT. Since CAT is not dependent on perf, I created this hook to start CQM monitoring

Re: [PATCH 25/32] sched: introduce the finish_arch_pre_lock_switch() scheduler hook

2016-04-29 Thread Vikas Shivappa
On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: (Re-sending in plain text) This hook is used in the following patch in the series to write to PQR_ASSOC_MSR, a msr that is utilized both by CQM/CMT and by CAT. Since CAT is not dependent on perf, I created this hook to start CQM monitoring

Re: [PATCH 01/32] perf/x86/intel/cqm: temporarily remove MBM from CQM and cleanup

2016-04-29 Thread Vikas Shivappa
On Thu, 28 Apr 2016, David Carrillo-Cisneros wrote: Removing MBM code from arch/x86/events/intel/cqm.c. MBM will be added using the new RMID infrastucture introduced in this patch series. I am still working on to rebase mbm on top of the new cqm series (probably with the new quick fixes i

Re: [PATCH 01/32] perf/x86/intel/cqm: temporarily remove MBM from CQM and cleanup

2016-04-29 Thread Vikas Shivappa
On Thu, 28 Apr 2016, David Carrillo-Cisneros wrote: Removing MBM code from arch/x86/events/intel/cqm.c. MBM will be added using the new RMID infrastucture introduced in this patch series. I am still working on to rebase mbm on top of the new cqm series (probably with the new quick fixes i

[PATCH V2 0/3] Urgent fixes for Intel CQM/MBM counting

2016-04-27 Thread Vikas Shivappa
Sending some urgent fixes for the MBM(memory b/w monitoring) which is upstreamed from 4.6-rc1. Patches apply on 4.6-rc1. CQM and MBM counters reported some incorrect counts for different scenarios like interval mode or for multiple perf instances. An updated V2 as per Peter feedback: fixing a

[PATCH 1/3] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-04-27 Thread Vikas Shivappa
instance is seeing. This patch tries to fix the issue by saving the count for all the events in the same event group. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 24 insertions(

[PATCH 2/3] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-27 Thread Vikas Shivappa
after RMID1 and then again after RMID2. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 49 - include/linux/perf_event.h | 1 + 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/ar

[PATCH V2 0/3] Urgent fixes for Intel CQM/MBM counting

2016-04-27 Thread Vikas Shivappa
Sending some urgent fixes for the MBM(memory b/w monitoring) which is upstreamed from 4.6-rc1. Patches apply on 4.6-rc1. CQM and MBM counters reported some incorrect counts for different scenarios like interval mode or for multiple perf instances. An updated V2 as per Peter feedback: fixing a

[PATCH 1/3] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-04-27 Thread Vikas Shivappa
instance is seeing. This patch tries to fix the issue by saving the count for all the events in the same event group. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/arch

[PATCH 2/3] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-27 Thread Vikas Shivappa
after RMID1 and then again after RMID2. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 49 - include/linux/perf_event.h | 1 + 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events

[PATCH 3/3] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-27 Thread Vikas Shivappa
as the PID1 is already counted. 4.event2 stores st_count as 100MB. 5.After some time, when user wants to count event2 and say RMID1's current total_bytes 110MB, we report 110MB - 100MB = 10MB Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.

[PATCH 3/3] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-27 Thread Vikas Shivappa
as the PID1 is already counted. 4.event2 stores st_count as 100MB. 5.After some time, when user wants to count event2 and say RMID1's current total_bytes 110MB, we report 110MB - 100MB = 10MB Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 71

Re: [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-25 Thread Vikas Shivappa
'per event' rc_count = read_sample(event->rmid) - per event start count; 'per event' rc_count += read_sample(event->rmid) - per event start count;

Re: [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-25 Thread Vikas Shivappa
'per event' rc_count = read_sample(event->rmid) - per event start count; 'per event' rc_count += read_sample(event->rmid) - per event start count;

Re: [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Mon, Apr 25, 2016 at 09:44:53AM -0700, Vikas Shivappa wrote: On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:20PM -0700, Vikas Shivappa wrote: When multiple instances of perf reuse RMID, then we need to start

Re: [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Mon, Apr 25, 2016 at 09:44:53AM -0700, Vikas Shivappa wrote: On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:20PM -0700, Vikas Shivappa wrote: When multiple instances of perf reuse RMID, then we need to start

Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Mon, Apr 25, 2016 at 11:04:38AM -0700, Vikas Shivappa wrote: This is a 'creative' solution; why don't you do the normal thing, which is: start: prev_count = read_hw_counter(); read: do { prev = prev_count

Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Mon, Apr 25, 2016 at 11:04:38AM -0700, Vikas Shivappa wrote: This is a 'creative' solution; why don't you do the normal thing, which is: start: prev_count = read_hw_counter(); read: do { prev = prev_count

Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:19PM -0700, Vikas Shivappa wrote: +static inline void mbm_set_rccount( + struct perf_event *event, struct rmid_read *rr) That's horrible style, the 'normal' style is something like: static

Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:19PM -0700, Vikas Shivappa wrote: +static inline void mbm_set_rccount( + struct perf_event *event, struct rmid_read *rr) That's horrible style, the 'normal' style is something like: static

Re: [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:20PM -0700, Vikas Shivappa wrote: When multiple instances of perf reuse RMID, then we need to start counting for each instance rather than reporting the current RMID count. This patch adds a st_count(start count) per

Re: [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:20PM -0700, Vikas Shivappa wrote: When multiple instances of perf reuse RMID, then we need to start counting for each instance rather than reporting the current RMID count. This patch adds a st_count(start count) per

Re: [PATCH 1/4] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:18PM -0700, Vikas Shivappa wrote: During RMID recycling, when an event loses the RMID we saved the counter for group leader but it was not being saved for all the events in an event group. This would lead to a situation

Re: [PATCH 1/4] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-04-25 Thread Vikas Shivappa
On Mon, 25 Apr 2016, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 05:27:18PM -0700, Vikas Shivappa wrote: During RMID recycling, when an event loses the RMID we saved the counter for group leader but it was not being saved for all the events in an event group. This would lead to a situation

[PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events

2016-04-22 Thread Vikas Shivappa
very confusing numbers of intermittent zero and some occupancy when perf is run with cgroup and task events. Hence removing support for the parts which are broken rather than pretending to support it and giving incorrect data. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> ---

[PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-22 Thread Vikas Shivappa
after RMID1 and then again after RMID2. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 40 +--- include/linux/perf_event.h | 1 + 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/arch/x86/

[PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-22 Thread Vikas Shivappa
When multiple instances of perf reuse RMID, then we need to start counting for each instance rather than reporting the current RMID count. This patch adds a st_count(start count) per event to track the same. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events

[PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events

2016-04-22 Thread Vikas Shivappa
very confusing numbers of intermittent zero and some occupancy when perf is run with cgroup and task events. Hence removing support for the parts which are broken rather than pretending to support it and giving incorrect data. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 3

[PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle

2016-04-22 Thread Vikas Shivappa
after RMID1 and then again after RMID2. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 40 +--- include/linux/perf_event.h | 1 + 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events

[PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused

2016-04-22 Thread Vikas Shivappa
When multiple instances of perf reuse RMID, then we need to start counting for each instance rather than reporting the current RMID count. This patch adds a st_count(start count) per event to track the same. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 71

[PATCH V1 0/4] Urgent fixes for Intel CQM/MBM counting

2016-04-22 Thread Vikas Shivappa
Sending some urgent fixes for the MBM(memory b/w monitoring) which is upstreamed from 4.6-rc1. Patches apply on 4.6-rc1. CQM and MBM counters reported some incorrect counts for different scenarios like interval mode or for multiple perf instances. The 1/4,2/4,3/4 address these issues. The last

[PATCH 1/4] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-04-22 Thread Vikas Shivappa
instance is seeing. This patch tries to fix the issue by saving the count for all the events in the same event group. Signed-off-by: Vikas Shivappa <vikas.shiva...@linux.intel.com> --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 24 insertions(

[PATCH V1 0/4] Urgent fixes for Intel CQM/MBM counting

2016-04-22 Thread Vikas Shivappa
Sending some urgent fixes for the MBM(memory b/w monitoring) which is upstreamed from 4.6-rc1. Patches apply on 4.6-rc1. CQM and MBM counters reported some incorrect counts for different scenarios like interval mode or for multiple perf instances. The 1/4,2/4,3/4 address these issues. The last

[PATCH 1/4] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled

2016-04-22 Thread Vikas Shivappa
instance is seeing. This patch tries to fix the issue by saving the count for all the events in the same event group. Signed-off-by: Vikas Shivappa --- arch/x86/events/intel/cqm.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/arch

Re: [tip:perf/urgent] perf/x86/cqm: Fix CQM handling of grouping events into a cache_group

2016-03-23 Thread Vikas Shivappa
On Wed, 23 Mar 2016, Matt Fleming wrote: On Mon, 21 Mar, at 11:14:37AM, Vikas Shivappa wrote: Before MBM , the below condition was never hit because we had only one event ? - if (a->hw.target == b->hw.target) + if (a->hw.target == b->hw.target) { +

Re: [tip:perf/urgent] perf/x86/cqm: Fix CQM handling of grouping events into a cache_group

2016-03-23 Thread Vikas Shivappa
On Wed, 23 Mar 2016, Matt Fleming wrote: On Mon, 21 Mar, at 11:14:37AM, Vikas Shivappa wrote: Before MBM , the below condition was never hit because we had only one event ? - if (a->hw.target == b->hw.target) + if (a->hw.target == b->hw.target) { +

Re: [tip:perf/urgent] perf/x86/mbm: Implement RMID recycling

2016-03-21 Thread Vikas Shivappa
On Mon, 21 Mar 2016, Matt Fleming wrote: On Mon, 21 Mar, at 02:53:04AM, tip-bot for Vikas Shivappa wrote: @@ -489,6 +496,22 @@ static u32 intel_cqm_xchg_rmid(struct perf_event *group, u32 rmid) raw_spin_unlock_irq(_lock); + /* +* If the allocation is for mbm, init

Re: [tip:perf/urgent] perf/x86/mbm: Implement RMID recycling

2016-03-21 Thread Vikas Shivappa
On Mon, 21 Mar 2016, Matt Fleming wrote: On Mon, 21 Mar, at 02:53:04AM, tip-bot for Vikas Shivappa wrote: @@ -489,6 +496,22 @@ static u32 intel_cqm_xchg_rmid(struct perf_event *group, u32 rmid) raw_spin_unlock_irq(_lock); + /* +* If the allocation is for mbm, init

Re: [tip:perf/urgent] perf/x86/cqm: Fix CQM handling of grouping events into a cache_group

2016-03-21 Thread Vikas Shivappa
On Mon, 21 Mar 2016, Matt Fleming wrote: On Mon, 21 Mar, at 02:51:29AM, tip-bot for Vikas Shivappa wrote: Commit-ID: a223c1c7ab4cc64537dc4b911f760d851683768a Gitweb: http://git.kernel.org/tip/a223c1c7ab4cc64537dc4b911f760d851683768a Author: Vikas Shivappa <vikas.sh

Re: [tip:perf/urgent] perf/x86/cqm: Fix CQM handling of grouping events into a cache_group

2016-03-21 Thread Vikas Shivappa
On Mon, 21 Mar 2016, Matt Fleming wrote: On Mon, 21 Mar, at 02:51:29AM, tip-bot for Vikas Shivappa wrote: Commit-ID: a223c1c7ab4cc64537dc4b911f760d851683768a Gitweb: http://git.kernel.org/tip/a223c1c7ab4cc64537dc4b911f760d851683768a Author: Vikas Shivappa AuthorDate: Thu, 10 Mar

[tip:perf/urgent] perf/x86/mbm: Add support for MBM counter overflow handling

2016-03-21 Thread tip-bot for Vikas Shivappa
Commit-ID: e7ee3e8cb550ce43752ae1d1b190d6b5c4150a43 Gitweb: http://git.kernel.org/tip/e7ee3e8cb550ce43752ae1d1b190d6b5c4150a43 Author: Vikas Shivappa <vikas.shiva...@linux.intel.com> AuthorDate: Fri, 11 Mar 2016 11:26:17 -0800 Committer: Ingo Molnar <mi...@kernel.org> CommitD

[tip:perf/urgent] perf/x86/mbm: Add support for MBM counter overflow handling

2016-03-21 Thread tip-bot for Vikas Shivappa
Commit-ID: e7ee3e8cb550ce43752ae1d1b190d6b5c4150a43 Gitweb: http://git.kernel.org/tip/e7ee3e8cb550ce43752ae1d1b190d6b5c4150a43 Author: Vikas Shivappa AuthorDate: Fri, 11 Mar 2016 11:26:17 -0800 Committer: Ingo Molnar CommitDate: Mon, 21 Mar 2016 09:08:21 +0100 perf/x86/mbm: Add

[tip:perf/urgent] perf/x86/cqm: Fix CQM memory leak and notifier leak

2016-03-21 Thread tip-bot for Vikas Shivappa
Commit-ID: ada2f634cd50d050269b67b4e2966582387e7c27 Gitweb: http://git.kernel.org/tip/ada2f634cd50d050269b67b4e2966582387e7c27 Author: Vikas Shivappa <vikas.shiva...@linux.intel.com> AuthorDate: Thu, 10 Mar 2016 15:32:08 -0800 Committer: Ingo Molnar <mi...@kernel.org> CommitD

[tip:perf/urgent] perf/x86/cqm: Fix CQM handling of grouping events into a cache_group

2016-03-21 Thread tip-bot for Vikas Shivappa
Commit-ID: a223c1c7ab4cc64537dc4b911f760d851683768a Gitweb: http://git.kernel.org/tip/a223c1c7ab4cc64537dc4b911f760d851683768a Author: Vikas Shivappa <vikas.shiva...@linux.intel.com> AuthorDate: Thu, 10 Mar 2016 15:32:07 -0800 Committer: Ingo Molnar <mi...@kernel.org> CommitD

<    1   2   3   4   5   6   7   8   9   10   >