RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-28 Thread Liang, Kan
> On Fri, Aug 28, 2015 at 8:00 AM, Liang, Kan wrote: > > > > > >> On Tue, Aug 25, 2015 at 1:15 PM, Liang, Kan > wrote: > >> > > >> >> >> > > >> >> >> I understand that these metrics are useful and needed however > >> >> >> if I look at the broader picture I see many PMUs doing similar > >> >> >

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-28 Thread Stephane Eranian
On Fri, Aug 28, 2015 at 8:00 AM, Liang, Kan wrote: > > >> On Tue, Aug 25, 2015 at 1:15 PM, Liang, Kan wrote: >> > >> >> >> > >> >> >> I understand that these metrics are useful and needed however if I >> >> >> look at the broader picture I see many PMUs doing similar things >> >> >> or appearing

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-28 Thread Liang, Kan
> On Tue, Aug 25, 2015 at 1:15 PM, Liang, Kan wrote: > > > >> >> > > >> >> I understand that these metrics are useful and needed however if I > >> >> look at the broader picture I see many PMUs doing similar things > >> >> or appearing different when they are actually very close. It would > >> >

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-28 Thread Stephane Eranian
On Tue, Aug 25, 2015 at 1:15 PM, Liang, Kan wrote: > >> >> > >> >> I understand that these metrics are useful and needed however if I >> >> look at the broader picture I see many PMUs doing similar things or >> >> appearing different when they are actually very close. It would be >> >> nice to hav

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-25 Thread Liang, Kan
> >> > > >> I understand that these metrics are useful and needed however if I > >> look at the broader picture I see many PMUs doing similar things or > >> appearing different when they are actually very close. It would be > >> nice to have a more unified approach. You have RAPL (client, server)

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Liang, Kan
> >> On Thu, Aug 6, 2015 at 1:25 PM, Liang, Kan wrote: > >> > > >> >> >> >> >> +static cpumask_t power_cstate_core_cpu_mask; > >> >> >> >> > > >> >> >> >> > That one typically does not need a cpumask. > >> >> >> >> > > >> >> >> >> You need to pick one CPU out of the multi-core. But it is > >> >>

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Stephane Eranian
Melo; >> a...@linux.intel.com; LKML >> Subject: Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs >> support >> >> On Thu, Aug 6, 2015 at 1:25 PM, Liang, Kan wrote: >> > >> >> >> >> >> +static cpu

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Liang, Kan
> -Original Message- > From: Stephane Eranian [mailto:eran...@google.com] > Sent: Thursday, August 06, 2015 4:38 PM > To: Liang, Kan > Cc: Peter Zijlstra; mi...@redhat.com; Arnaldo Carvalho de Melo; > a...@linux.intel.com; LKML > Subject: Re: [PATCH V2 1/1] perf

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Peter Zijlstra
On Thu, Aug 06, 2015 at 11:14:17AM -0700, Stephane Eranian wrote: > On Thu, Aug 6, 2015 at 8:44 AM, Peter Zijlstra wrote: > >> +static cpumask_t power_cstate_core_cpu_mask; > > > > That one typically does not need a cpumask. > > > You need to pick one CPU out of the multi-core. But it is for clien

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Stephane Eranian
On Thu, Aug 6, 2015 at 1:25 PM, Liang, Kan wrote: > >> >> >> >> +static cpumask_t power_cstate_core_cpu_mask; >> >> >> > >> >> >> > That one typically does not need a cpumask. >> >> >> > >> >> >> You need to pick one CPU out of the multi-core. But it is for >> >> >> client parts thus there is only

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Liang, Kan
> >> >> >> +static cpumask_t power_cstate_core_cpu_mask; > >> >> > > >> >> > That one typically does not need a cpumask. > >> >> > > >> >> You need to pick one CPU out of the multi-core. But it is for > >> >> client parts thus there is only one socket. At least this is my > understanding. > >> >>

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Stephane Eranian
On Thu, Aug 6, 2015 at 12:25 PM, Liang, Kan wrote: > >> >> On Thu, Aug 6, 2015 at 11:52 AM, Liang, Kan wrote: >> > >> > >> >> >> +static cpumask_t power_cstate_core_cpu_mask; >> >> > >> >> > That one typically does not need a cpumask. >> >> > >> >> You need to pick one CPU out of the multi-core.

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Liang, Kan
> > On Thu, Aug 6, 2015 at 11:52 AM, Liang, Kan wrote: > > > > > >> >> +static cpumask_t power_cstate_core_cpu_mask; > >> > > >> > That one typically does not need a cpumask. > >> > > >> You need to pick one CPU out of the multi-core. But it is for client > >> parts thus there is only one socket

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Stephane Eranian
On Thu, Aug 6, 2015 at 11:52 AM, Liang, Kan wrote: > > >> >> +static cpumask_t power_cstate_core_cpu_mask; >> > >> > That one typically does not need a cpumask. >> > >> You need to pick one CPU out of the multi-core. But it is for client parts >> thus there is only one socket. At least this is my

RE: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Liang, Kan
> >> +static cpumask_t power_cstate_core_cpu_mask; > > > > That one typically does not need a cpumask. > > > You need to pick one CPU out of the multi-core. But it is for client parts > thus there is only one socket. At least this is my understanding. > CORE_C*_RESIDENCY are available for physi

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Stephane Eranian
On Thu, Aug 6, 2015 at 8:44 AM, Peter Zijlstra wrote: > On Mon, Jul 27, 2015 at 04:46:16AM -0400, kan.li...@intel.com wrote: > > As a general comment; this thing is unreadable. Far too much macro foo > to instantiate the different PMUs. > >> +struct perf_power_cstate_event_msr { >> + int i

Re: [PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-08-06 Thread Peter Zijlstra
On Mon, Jul 27, 2015 at 04:46:16AM -0400, kan.li...@intel.com wrote: As a general comment; this thing is unreadable. Far too much macro foo to instantiate the different PMUs. > +struct perf_power_cstate_event_msr { > + int id; > + u64 msr; > +}; > + > +enum perf_power_cstate_id {

[PATCH V2 1/1] perf/x86: Add Intel power cstate PMUs support

2015-07-27 Thread kan . liang
From: Kan Liang This patch adds new PMUs to support power cstate related free running (read-only) counters. These counters may be used simultaneously by other tools, such as turbostat. However, it still make sense to implement them in perf. Because we can conveniently collect them together with o