From owner-freebsd-current@FreeBSD.ORG Tue Nov 16 14:37:16 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 0C017106566C; Tue, 16 Nov 2010 14:37:16 +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 103CA8FC0C; Tue, 16 Nov 2010 14:37:14 +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 QAA10183; Tue, 16 Nov 2010 16:37:13 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CE29718.2050508@freebsd.org> Date: Tue, 16 Nov 2010 16:37:12 +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: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: 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: Tue, 16 Nov 2010 14:37:16 -0000 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? Thanks a lot! -- Andriy Gapon