From randyf@grimmy.eng.sun.com Thu Feb 12 16:19:53 2009
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1D0JrVO022780
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 12 Feb 2009 16:19:53 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n1D0Jl0s001808;
	Thu, 12 Feb 2009 16:19:53 -0800 (PST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KEZ00801A94R700@brm-avmta-1.central.sun.com>; Thu,
 12 Feb 2009 17:19:52 -0700 (MST)
Received: from grimmy.sfbay.sun.com ([129.146.108.114])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KEZ00KMLA93S380@brm-avmta-1.central.sun.com>; Thu,
 12 Feb 2009 17:19:51 -0700 (MST)
Received: from grimmy.eng.sun.com (localhost [127.0.0.1])
	by grimmy.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1D04nHx027355; Thu,
 12 Feb 2009 16:04:49 -0800 (PST)
Received: (from randyf@localhost)
	by grimmy.eng.sun.com (8.13.8+Sun/8.13.8/Submit) id n1D04nhf027351; Thu,
 12 Feb 2009 16:04:49 -0800 (PST)
Date: Thu, 12 Feb 2009 16:04:49 -0800 (PST)
From: Randy Fishel <randyf@grimmy.eng.sun.com>
Subject: Turbo mode observability [PSARC/2009/101 Self Review]
To: PSARC-ext@sun.com
Cc: Rafael.Vanoni@sun.com, aubrey.li@intel.com, tesla-dev@opensolaris.org
Message-id: <200902130004.n1D04nhf027351@grimmy.eng.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 1830


I am sponsoring this case for Rafael Vanoni and Aubrey Li.  It proposes
a kstat module for observing turbo mode on Intel processors.  It proposes
a micro/patch binding and a commited module.  I believe that this case
qualifies as a self-review, should someone request, it can be turned
into a fasttrack.


Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Turbo mode observability
    1.2. Name of Document Author/Supplier:
	 Author:  Rafael Vanoni
    1.3  Date of This Document:
	12 February, 2009
4. Technical Description
This RFE proposes to integrate observability features for Intel's
"Turbo Mode" feature. This functionality improves system performance
by raising the operating frequency of a subset of the system's cores
when at least half of the total amount of cores are idle and there's
is thermal headroom to do so. 
 
The OS can observe this behavior through the APERF and MPERF
registers. The proposed implementation will export the value of
these registers through a new kstats module, name "turbo". Allowing
kstat consumers to easily report when the system goes in/out of
turbo mode.

Example usage:

$ kstat -m turbo -i 7
module: turbo                           instance: 7 name:   turbo
        class:    misc crtime                          40.232317728
        snaptime                        66086.209235185
        turbo_acnt                      13060929505
        turbo_mcnt                      13504899451
        turbo_supported                 1

Interface stability:	Committed
Release Binding:	Micro/patch

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


From Edward.Shu@sun.com Thu Feb 12 19:01:07 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1D316v5027315
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 12 Feb 2009 19:01:07 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n1D30xaO000555
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Fri, 13 Feb 2009 11:01:05 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KEZ00A0NHPQKS00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 12 Feb 2009 19:01:02 -0800 (PST)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KEZ000F0HPNA7A0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Thu,
 12 Feb 2009 19:01:00 -0800 (PST)
Received: from fe-apac-05.sun.com
 (fe-apac-05.sun.com [192.18.19.176] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n1D30wrg005854	for
 <PSARC-ext@sun.com>; Fri, 13 Feb 2009 03:00:58 +0000 (GMT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KEZ00M00HFDQW00@mail-apac.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Fri, 13 Feb 2009 11:00:58 +0800 (SGT)
Received: from [129.158.218.35] ([unknown] [129.158.218.35])
 by mail-apac.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 with ESMTPSA id <0KEZ00JT5HPL2EI0@mail-apac.sun.com>; Fri,
 13 Feb 2009 11:00:58 +0800 (SGT)
Date: Fri, 13 Feb 2009 11:00:29 +0800
From: Edward Shu <Edward.Shu@sun.com>
Subject: Re: Turbo mode observability [PSARC/2009/101 Self Review]
In-reply-to: <200902130004.n1D04nhf027351@grimmy.eng.sun.com>
Sender: Edward.Shu@sun.com
To: Randy Fishel <randyf@grimmy.eng.sun.com>
Cc: PSARC-ext@sun.com, Rafael.Vanoni@sun.com, aubrey.li@intel.com,
        tesla-dev@opensolaris.org
Message-id: <4994E24D.3070300@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=GB2312
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200902130004.n1D04nhf027351@grimmy.eng.sun.com>
User-Agent: Thunderbird 2.0.0.9 (X11/20080213)
Status: RO
Content-Length: 1390

Randy Fishel:
> I am sponsoring this case for Rafael Vanoni and Aubrey Li.  It proposes
> a kstat module for observing turbo mode on Intel processors.  It proposes
> a micro/patch binding and a commited module.  I believe that this case
> qualifies as a self-review, should someone request, it can be turned
> into a fasttrack.
>
>
> Template Version: @(#)sac_nextcase %I% %G% SMI
> This information is Copyright 2009 Sun Microsystems
> 1. Introduction
>     1.1. Project/Component Working Name:
> 	 Turbo mode observability
>     1.2. Name of Document Author/Supplier:
> 	 Author:  Rafael Vanoni
>     1.3  Date of This Document:
> 	12 February, 2009
> 4. Technical Description
> This RFE proposes to integrate observability features for Intel's
> "Turbo Mode" feature. This functionality improves system performance
> by raising the operating frequency of a subset of the system's cores
> when at least half of the total amount of cores are idle and there's
> is thermal headroom to do so. 
>   
I think the transition is controlled by some firmware, and the OS can
only read the state instead of controlling this behavior. How often
does the OS read the register to refresh the kstats?


-- 
Best Regards,
Ming.

------------------------------------------
-Edward Shu 				  	
-Solaris x86 Engineering, Sun Microsystems
-tele: +86-10-62673100
__________________________________________



From Rafael.Vanoni@sun.com Thu Feb 12 19:33:10 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1D3X9rJ028101
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 12 Feb 2009 19:33:10 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n1D3X6RP020057
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Fri, 13 Feb 2009 03:33:09 GMT
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KEZ00409J76WE00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 12 Feb 2009 20:33:06 -0700 (MST)
Received: from sca-es-mail-1.sun.com ([192.18.43.132])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KEZ00MP3J751TC0@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Thu,
 12 Feb 2009 20:33:05 -0700 (MST)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n1D3X5uw019495	for
 <PSARC-ext@sun.com>; Thu, 12 Feb 2009 19:33:05 -0800 (PST)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KEZ00200J5BSO00@fe-sfbay-09.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 12 Feb 2009 19:33:05 -0800 (PST)
Received: from [192.168.1.66] ([unknown] [76.254.2.176])
 by fe-sfbay-09.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit
 (built Dec 23 2008)) with ESMTPSA id <0KEZ00H3ZJ74LSB0@fe-sfbay-09.sun.com>;
 Thu, 12 Feb 2009 19:33:05 -0800 (PST)
Date: Thu, 12 Feb 2009 19:33:04 -0800
From: Rafael Vanoni <Rafael.Vanoni@sun.com>
Subject: Re: Turbo mode observability [PSARC/2009/101 Self Review]
In-reply-to: <4994E24D.3070300@sun.com>
Sender: Rafael.Vanoni@sun.com
To: Edward Shu <Edward.Shu@sun.com>
Cc: Randy Fishel <randyf@grimmy.eng.sun.com>, PSARC-ext@sun.com,
        aubrey.li@intel.com, tesla-dev@opensolaris.org
Message-id: <4994E9F0.1020208@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200902130004.n1D04nhf027351@grimmy.eng.sun.com>
 <4994E24D.3070300@sun.com>
User-Agent: Thunderbird 2.0.0.18 (X11/20081125)
Status: RO
Content-Length: 1416

Edward Shu wrote:
> Randy Fishel:
>> I am sponsoring this case for Rafael Vanoni and Aubrey Li.  It proposes
>> a kstat module for observing turbo mode on Intel processors.  It proposes
>> a micro/patch binding and a commited module.  I believe that this case
>> qualifies as a self-review, should someone request, it can be turned
>> into a fasttrack.
>>
>>
>> Template Version: @(#)sac_nextcase %I% %G% SMI
>> This information is Copyright 2009 Sun Microsystems
>> 1. Introduction
>>     1.1. Project/Component Working Name:
>> 	 Turbo mode observability
>>     1.2. Name of Document Author/Supplier:
>> 	 Author:  Rafael Vanoni
>>     1.3  Date of This Document:
>> 	12 February, 2009
>> 4. Technical Description
>> This RFE proposes to integrate observability features for Intel's
>> "Turbo Mode" feature. This functionality improves system performance
>> by raising the operating frequency of a subset of the system's cores
>> when at least half of the total amount of cores are idle and there's
>> is thermal headroom to do so. 
>>   
> I think the transition is controlled by some firmware, and the OS can
> only read the state instead of controlling this behavior. How often
> does the OS read the register to refresh the kstats?
> 

Yes, the paragraph is describing the behavior of the feature, not 
implying that the OS controls it. The registers are read on demand by 
kstat or its consumers.

Rafael





From Rafael.Vanoni@Sun.COM Thu Feb 12 21:11:34 2009
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1D5BYDJ021573
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 12 Feb 2009 21:11:34 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n1D5BYVF028330
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 12 Feb 2009 21:11:34 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KEZ00F01NRAB700@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 12 Feb 2009 21:11:34 -0800 (PST)
Received: from sca-es-mail-1.sun.com ([192.18.43.132])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KEZ006WPNR94W70@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Thu,
 12 Feb 2009 21:11:33 -0800 (PST)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n1D5BX0u023440	for
 <PSARC-ext@sun.com>; Thu, 12 Feb 2009 21:11:33 -0800 (PST)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KEZ00G00NM77Y00@fe-sfbay-09.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 12 Feb 2009 21:11:33 -0800 (PST)
Received: from [192.168.1.66] ([unknown] [76.254.2.176])
 by fe-sfbay-09.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit
 (built Dec 23 2008)) with ESMTPSA id <0KEZ00GIUNR8CZ00@fe-sfbay-09.sun.com>;
 Thu, 12 Feb 2009 21:11:33 -0800 (PST)
Date: Thu, 12 Feb 2009 21:11:32 -0800
From: Rafael Vanoni <Rafael.Vanoni@Sun.COM>
Subject: Re: Turbo mode observability [PSARC/2009/101 Self Review]
In-reply-to: <4994E9F0.1020208@sun.com>
Sender: Rafael.Vanoni@Sun.COM
To: Rafael Vanoni <Rafael.Vanoni@Sun.COM>
Cc: Edward Shu <Edward.Shu@Sun.COM>, Randy Fishel <randyf@grimmy.eng.sun.com>,
        PSARC-ext@Sun.COM, aubrey.li@intel.com, tesla-dev@opensolaris.org
Message-id: <49950104.6080702@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200902130004.n1D04nhf027351@grimmy.eng.sun.com>
 <4994E24D.3070300@sun.com> <4994E9F0.1020208@sun.com>
User-Agent: Thunderbird 2.0.0.18 (X11/20081125)
Status: RO
Content-Length: 1747

Rafael Vanoni wrote:
> Edward Shu wrote:
>> Randy Fishel:
>>> I am sponsoring this case for Rafael Vanoni and Aubrey Li.  It proposes
>>> a kstat module for observing turbo mode on Intel processors.  It 
>>> proposes
>>> a micro/patch binding and a commited module.  I believe that this case
>>> qualifies as a self-review, should someone request, it can be turned
>>> into a fasttrack.
>>>
>>>
>>> Template Version: @(#)sac_nextcase %I% %G% SMI
>>> This information is Copyright 2009 Sun Microsystems
>>> 1. Introduction
>>>     1.1. Project/Component Working Name:
>>>      Turbo mode observability
>>>     1.2. Name of Document Author/Supplier:
>>>      Author:  Rafael Vanoni
>>>     1.3  Date of This Document:
>>>     12 February, 2009
>>> 4. Technical Description
>>> This RFE proposes to integrate observability features for Intel's
>>> "Turbo Mode" feature. This functionality improves system performance
>>> by raising the operating frequency of a subset of the system's cores
>>> when at least half of the total amount of cores are idle and there's
>>> is thermal headroom to do so.   
>> I think the transition is controlled by some firmware, and the OS can
>> only read the state instead of controlling this behavior. How often
>> does the OS read the register to refresh the kstats?
>>
> 
> Yes, the paragraph is describing the behavior of the feature, not 
> implying that the OS controls it. The registers are read on demand by 
> kstat or its consumers.

Correction, Aubrey's implementation reads the registers at every P-state 
transition if the system supports turbo mode. A kstat consumer may also 
cause the registers to be read if the CPU is in the highest P-state 
(P0), so that we have the most up to date value.

Rafael



