Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2010 16:51:39 +0200
From:      Daniel Nebdal <dnebdal@gmail.com>
To:        freebsd-current@freebsd.org
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: aperf/mperf
Message-ID:  <AANLkTikdC_Hio9cM-FOz_C2h4Bg-atXxMgny7qDzSMim@mail.gmail.com>
In-Reply-To: <4CE68C0B.1080007@freebsd.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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 19, 2010 at 4:39 PM, Andriy Gapon <avg@freebsd.org> 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.
>
> Ideas?
> Thanks!


No comment on where to put it, but one other detail: Since these are
measures since last reset, you probably want a similar
"cpu_zero_a_m_perf" call. As for how that interacts with the sysctl,
uhm ... maybe also offering a time-since-last-reset could be useful?

--
Daniel Nebdal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikdC_Hio9cM-FOz_C2h4Bg-atXxMgny7qDzSMim>