From owner-freebsd-current@FreeBSD.ORG Thu Nov 18 12:32:36 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F99B1065696; Thu, 18 Nov 2010 12:32:36 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8DBD98FC0C; Thu, 18 Nov 2010 12:32:35 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA22794; Thu, 18 Nov 2010 14:32:27 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CE51CDA.6010202@freebsd.org> Date: Thu, 18 Nov 2010 14:32:26 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: George Neville-Neil References: <4CE29718.2050508@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 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-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 12:32:37 -0000 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 to notice things like performance boost, which is generally >> hidden from software. >> What would be a proper place to add code that would measure APERF/MPERF ratio? >> When should trigger such a measurement and over what interval? >> Ideas? > > Can you point me at documentation for this? This sounds a lot like > hwpmc(4) and I wonder if we can make these available in the same way. Actually it feels more cpufreq-ish to me. This feature is documented in, e.g., Intel Software Developer's Manual volume 3A, section 14.2 P-STATE HARDWARE COORDINATION. -- Andriy Gapon