<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Package C-state Residency Counters in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100168#M5835</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;A zero value is returned when reading the msr registers at&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;3F8H (MSR_PKG_C3_RESIDENCY)&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;3F9H (MSR_PKG_C6_RESIDENCY) &lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;3FAH (MSR_PKG_C7_RESIDENCY)&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;( this is done with a Bloomfield processor, architecture Nehalem, in a Linux driver with Ring0 access level, using the Core BSP )&lt;/P&gt;

&lt;P&gt;Although they are documented "&lt;EM&gt;Value since last reset&lt;/EM&gt;" in Vol.3C, table 35-13, I tried also to write some "&lt;EM&gt;Package C-State Limit&lt;/EM&gt;"&amp;nbsp;bits [2:0] in msr&amp;nbsp;E2H (MSR_PKG_CST_CONFIG_ CONTROL). No success.&lt;/P&gt;

&lt;P&gt;Are those counters really exist on Nehalem ?&lt;/P&gt;

&lt;P&gt;What can be the process to activate them ?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;CyrIng&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2017 17:51:23 GMT</pubDate>
    <dc:creator>CyrIng</dc:creator>
    <dc:date>2017-02-21T17:51:23Z</dc:date>
    <item>
      <title>Package C-state Residency Counters</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100168#M5835</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;A zero value is returned when reading the msr registers at&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;3F8H (MSR_PKG_C3_RESIDENCY)&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;3F9H (MSR_PKG_C6_RESIDENCY) &lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;3FAH (MSR_PKG_C7_RESIDENCY)&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;( this is done with a Bloomfield processor, architecture Nehalem, in a Linux driver with Ring0 access level, using the Core BSP )&lt;/P&gt;

&lt;P&gt;Although they are documented "&lt;EM&gt;Value since last reset&lt;/EM&gt;" in Vol.3C, table 35-13, I tried also to write some "&lt;EM&gt;Package C-State Limit&lt;/EM&gt;"&amp;nbsp;bits [2:0] in msr&amp;nbsp;E2H (MSR_PKG_CST_CONFIG_ CONTROL). No success.&lt;/P&gt;

&lt;P&gt;Are those counters really exist on Nehalem ?&lt;/P&gt;

&lt;P&gt;What can be the process to activate them ?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;CyrIng&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 17:51:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100168#M5835</guid>
      <dc:creator>CyrIng</dc:creator>
      <dc:date>2017-02-21T17:51:23Z</dc:date>
    </item>
    <item>
      <title>So far, best answer is</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100169#M5836</link>
      <description>&lt;P&gt;So far, best answer is provided in&amp;nbsp;&lt;A href="https://biosbits.org/screenshots"&gt;biosbits&lt;/A&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium;"&gt;Via the rdmsr command, we see that the BIOS has limited package C-states by setting MSR 0xE2 bits [2:0] to 1. However, this BIOS did have an option to disable locking of that register, and using that option turned off the lock bit (bit 15). So, we can fix it via the wrmsr command, and now we get package C-states&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 27 Feb 2017 16:02:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100169#M5836</guid>
      <dc:creator>CyrIng</dc:creator>
      <dc:date>2017-02-27T16:02:44Z</dc:date>
    </item>
    <item>
      <title>Surprisingly package state</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100170#M5837</link>
      <description>Surprisingly package state counters have values with Haswell but not with Nehalem !

My last version of the software allows to show percentage of each counter divided by TSC

Just press the % key in CoreFreq @ &lt;A href="http://github.com/cyring/CoreFreq" target="_blank"&gt;http://github.com/cyring/CoreFreq&lt;/A&gt;</description>
      <pubDate>Sun, 09 Jul 2017 21:38:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100170#M5837</guid>
      <dc:creator>CyrIng</dc:creator>
      <dc:date>2017-07-09T21:38:16Z</dc:date>
    </item>
    <item>
      <title>Sometimes the implementations</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100171#M5838</link>
      <description>&lt;P&gt;Sometimes the implementations actually improve over time!&amp;nbsp;&amp;nbsp; Sometimes they don't... :-(&lt;/P&gt;

&lt;P&gt;It is very difficult to come up with architectural features that will stand the test of time.&amp;nbsp;&amp;nbsp; With the increase in attention to power consumption, package C-states have become more important over time. &amp;nbsp; Since the Package C-state residency counters are clearly labeled as referring to processor-specific C-state names (rather than ACPI C-state names), this feature has the good combination of being both important and flexible.&lt;/P&gt;

&lt;P&gt;Other features have been more problematic.&amp;nbsp; RAPL is an example -- the original definitions refer to "domains" that are not necessarily practical to track as processor designs become more complex.&amp;nbsp;&amp;nbsp; The original definitions also failed to define an interface that software could use to determine which RAPL features exist on a given processor, so a code has to either include tables of which features are supported by each DisplayFamily_DisplayModel combination, or include code that can deal with MSR reads that fail.&amp;nbsp;&amp;nbsp; The logic needs to be considered carefully, since at least one processor (Haswell EP) allows reads from at least one of the PP0 domain MSRs, but does not actually support the domain.&lt;/P&gt;

&lt;P&gt;I am glad you found some answers at biosbits.org -- the last time I looked there (not recently) I was not able to find any useful information.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 13:04:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Package-C-state-Residency-Counters/m-p/1100171#M5838</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2017-07-10T13:04:35Z</dc:date>
    </item>
  </channel>
</rss>

