Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Nov 2010 11:54:01 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-acpi@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: aperf/mperf
Message-ID:  <4CE79AB9.1020303@freebsd.org>
In-Reply-To: <4CE6CB3E.70009@root.org>
References:  <4CE29718.2050508@freebsd.org>	<D1DB20AD-779E-469B-BFFA-C0BA1A249858@neville-neil.com>	<4CE51CDA.6010202@freebsd.org>	<AANLkTimcJFL8Y47mTznKz72w0z5%2BVoc9oWrz92kE%2BwQa@mail.gmail.com>	<4CE533DE.7010401@freebsd.org> <4CE68C0B.1080007@freebsd.org> <4CE6CB3E.70009@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 two UQUAD values.
>>
>> But I am not sure where to put the code for both APIs.
>> Adding another device under cpu seems like an overkill.
> 
> These can be exported as a common interface from cpufreq
> (dev,cpu.X.perf_stats) and supplied by the child acpi_perf driver on
> each cpu.

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, another exotic case - if a driver like est or hwpstate is attached
"directly", i.e. there is no acpi_perf/_PSS - would the MSRs be still useful?
Not sure.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CE79AB9.1020303>