From owner-freebsd-acpi@FreeBSD.ORG Fri Nov 19 19:08:51 2010 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6603E106566B; Fri, 19 Nov 2010 19:08:51 +0000 (UTC) (envelope-from nate@root.org) Received: from mail.root.org (root.org [208.72.84.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3F8E88FC0C; Fri, 19 Nov 2010 19:08:51 +0000 (UTC) Received: from [10.0.5.50] (ppp-71-139-7-59.dsl.snfc21.pacbell.net [71.139.7.59]) by mail.root.org (Postfix) with ESMTP id 656AD615C; Fri, 19 Nov 2010 19:08:49 +0000 (UTC) Message-ID: <4CE6CB3E.70009@root.org> Date: Fri, 19 Nov 2010 11:08:46 -0800 From: Nate Lawson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Andriy Gapon References: <4CE29718.2050508@freebsd.org> <4CE51CDA.6010202@freebsd.org> <4CE533DE.7010401@freebsd.org> <4CE68C0B.1080007@freebsd.org> In-Reply-To: <4CE68C0B.1080007@freebsd.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: aperf/mperf X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:08:51 -0000 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. -- Nate