Re: [PATCH v3 4/7] MIPS: perf: Fix perf with MT counting other threads

2018-05-17 Thread Matt Redfearn
Hi James, On 16/05/18 18:59, James Hogan wrote: On Fri, Apr 20, 2018 at 11:23:06AM +0100, Matt Redfearn wrote: diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index 7e2b7d38a774..fe50986e83c6 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/

Re: [PATCH v3 4/7] MIPS: perf: Fix perf with MT counting other threads

2018-05-16 Thread James Hogan
On Fri, Apr 20, 2018 at 11:23:06AM +0100, Matt Redfearn wrote: > diff --git a/arch/mips/kernel/perf_event_mipsxx.c > b/arch/mips/kernel/perf_event_mipsxx.c > index 7e2b7d38a774..fe50986e83c6 100644 > --- a/arch/mips/kernel/perf_event_mipsxx.c > +++ b/arch/mips/kernel/perf_event_mipsxx.c > @@ -323,

[PATCH v3 4/7] MIPS: perf: Fix perf with MT counting other threads

2018-04-20 Thread Matt Redfearn
When perf is used in non-system mode, i.e. without specifying CPUs to count on, check_and_calc_range falls into the case when it sets M_TC_EN_ALL in the counter config_base. This has the impact of always counting for all of the threads in a core, even when the user has not requested it. For example