Re: aperf/mperf

2010-11-23 Thread Andriy Gapon
on 20/11/2010 11:54 Andriy Gapon said the following: > This suggestion sounds quite appealing. > But I have some concerns. > What if hardware has the capability, but there is no cpufreq - could these > MSRs > be still useful? Or are they useful only with cpufreq? Probably the > latter... > Then

Re: aperf/mperf

2010-11-20 Thread Andriy Gapon
on 19/11/2010 21:08 Nate Lawson said the following: > On 11/19/2010 6:39 AM, Andriy Gapon wrote: >> >> I am thinking about providing two APIs for this. >> >> 1. KPI >> void cpu_get_a_m_perf(u_int cpu, uint64_t *aperf, uint64_t *mperf); >> >> 2. Userland >> sysctl dev.cpu.N.aperf_mperf that returns

Re: aperf/mperf

2010-11-19 Thread Nate Lawson
On 11/19/2010 6:39 AM, Andriy Gapon wrote: > > I am thinking about providing two APIs for this. > > 1. KPI > void cpu_get_a_m_perf(u_int cpu, uint64_t *aperf, uint64_t *mperf); > > 2. Userland > sysctl dev.cpu.N.aperf_mperf that returns two UQUAD values. > > But I am not sure where to put the c

Re: aperf/mperf

2010-11-19 Thread Andriy Gapon
[looks like I originally sent the reply only privately] on 19/11/2010 16:50 Daniel Nebdal said the following: > On Fri, Nov 19, 2010 at 4:39 PM, Andriy Gapon wrote: >> >> I am thinking about providing two APIs for this. >> >> 1. KPI >> void cpu_get_a_m_perf(u_int cpu, uint64_t *aperf, uint64_t *

Re: aperf/mperf

2010-11-19 Thread Daniel Nebdal
On Fri, Nov 19, 2010 at 4:39 PM, Andriy Gapon wrote: > > I am thinking about providing two APIs for this. > > 1. KPI > void cpu_get_a_m_perf(u_int cpu, uint64_t *aperf, uint64_t *mperf); > > 2. Userland > sysctl dev.cpu.N.aperf_mperf that returns two UQUAD values. > > But I am not sure where to pu

Re: aperf/mperf

2010-11-19 Thread Andriy Gapon
I am thinking about providing two APIs for this. 1. KPI void cpu_get_a_m_perf(u_int cpu, uint64_t *aperf, uint64_t *mperf); 2. Userland sysctl dev.cpu.N.aperf_mperf that returns two UQUAD values. But I am not sure where to put the code for both APIs. Adding another device under cpu seems like a

Re: aperf/mperf

2010-11-18 Thread George Neville-Neil
On Nov 18, 2010, at 07:32 , Andriy Gapon wrote: > on 18/11/2010 05:53 George Neville-Neil said the following: >> >> On Nov 16, 2010, at 09:37 , Andriy Gapon wrote: >> >>> >>> Many modern processors provide APERF and MPERF MSRs which allow to easily >>> and >>> reliable calculate average CPU p

Re: aperf/mperf

2010-11-18 Thread Andriy Gapon
on 18/11/2010 15:38 Daniel Nebdal said the following: > Just for the sake of gathering information here: > What they offer are two (64-bit, wrapping) counters; one that > increases at a constant rate, and one that increases in proportion to > the current performance of the CPU, so that APERF/MPERF

Re: aperf/mperf

2010-11-18 Thread Daniel Nebdal
On Thu, Nov 18, 2010 at 2:32 PM, Andriy Gapon wrote: > on 18/11/2010 05:53 George Neville-Neil said the following: >> >> On Nov 16, 2010, at 09:37 , Andriy Gapon wrote: >> >>> >>> Many modern processors provide APERF and MPERF MSRs which allow to easily >>> and >>> reliable calculate average CPU

Re: aperf/mperf

2010-11-18 Thread Andriy Gapon
on 18/11/2010 05:53 George Neville-Neil said the following: > > On Nov 16, 2010, at 09:37 , Andriy Gapon wrote: > >> >> Many modern processors provide APERF and MPERF MSRs which allow to easily and >> reliable calculate average CPU performance level over some interval of time. >> This also allows

Re: aperf/mperf

2010-11-17 Thread George Neville-Neil
On Nov 16, 2010, at 09:37 , Andriy Gapon wrote: > > Many modern processors provide APERF and MPERF MSRs which allow to easily and > reliable calculate average CPU performance level over some interval of time. > This also allows to notice things like performance boost, which is generally > hidden