From owner-freebsd-current@FreeBSD.ORG Thu Nov 18 14:10:49 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 5B504106566C; Thu, 18 Nov 2010 14:10:49 +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 71EAC8FC14; Thu, 18 Nov 2010 14:10:48 +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 QAA24448; Thu, 18 Nov 2010 16:10:39 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CE533DE.7010401@freebsd.org> Date: Thu, 18 Nov 2010 16:10:38 +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: Daniel Nebdal References: <4CE29718.2050508@freebsd.org> <4CE51CDA.6010202@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: George Neville-Neil , freebsd-current@freebsd.org, freebsd-acpi@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 14:10:49 -0000 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 = fraction of > max possible performance the CPU has offered since the last time the > counters were zeroed. Intel specifically suggests multiplying that > with the observed CPU load over the same time period to get an > absolute CPU load number, and using that to pick a suitable P-state. > > On a tangent, I wonder if you can get APERF>MPERF if you're using an > i5/i7 and their dynamic/automatic overclocking kicks in? Yes, I believe so. At the very least AMD explicitly documents that to be the case when Core Performance Boost feature is activated. > As for what to do with it, it sounds like it would make sense as an > alternate data source for powerd? Yes, indeed. -- Andriy Gapon