<?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 find p-states heuristic in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/find-p-states-heuristic/m-p/1157503#M6965</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;"Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3 (3A, 3B, 3C &amp;amp; 3D): System Programming Guide" gives an example to determine the target p-state (see Example 14-1. Determine Target P-state From Hardware Coordinated Feedback).&lt;/P&gt;&lt;P&gt;The proposed heuristic is based the function "FindPstate".&lt;/P&gt;&lt;P&gt;Do you know an example of such function. The pseudocode would be helpful to understand such function.&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;joel penhoat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 14-1. Determine Target P-state From Hardware Coordinated Feedback&lt;/P&gt;&lt;P&gt;DWORD PercentBusy; // Percentage of processor time not idle.&lt;BR /&gt;// Measure “PercentBusy“ during previous sampling window.&lt;BR /&gt;// Typically, “PercentBusy“ is measure over a time scale suitable for&lt;BR /&gt;// power management decisions&lt;BR /&gt;//&lt;BR /&gt;// RDMSR of MCNT and ACNT should be performed without delay.&lt;BR /&gt;// Software needs to exercise care to avoid delays between&lt;BR /&gt;// the two RDMSRs (for example, interrupts).&lt;BR /&gt;MCNT = RDMSR(IA32_MPERF);&lt;BR /&gt;ACNT = RDMSR(IA32_APERF);&lt;BR /&gt;// PercentPerformance indicates the percentage of the processor&lt;BR /&gt;// that is in use. The calculation is based on the PercentBusy,&lt;BR /&gt;// that is the percentage of processor time not idle and the P-state&lt;BR /&gt;// hardware coordinated feedback using the ACNT/MCNT ratio.&lt;BR /&gt;// Note that both values need to be calculated over the same&lt;/P&gt;&lt;P&gt;// time window.&lt;BR /&gt;PercentPerformance = PercentBusy * (ACNT/MCNT);&lt;BR /&gt;// This example does not cover the additional logic or algorithms&lt;BR /&gt;// necessary to coordinate multiple logical processors to a target P-state.&lt;BR /&gt;TargetPstate = FindPstate(PercentPerformance);&lt;BR /&gt;if (TargetPstate ≠ currentPstate) {&lt;BR /&gt;SetPState(TargetPstate);&lt;BR /&gt;}&lt;BR /&gt;// WRMSR of MCNT and ACNT should be performed without delay.&lt;BR /&gt;// Software needs to exercise care to avoid delays between&lt;BR /&gt;// the two WRMSRs (for example, interrupts).&lt;BR /&gt;WRMSR(IA32_MPERF, 0);&lt;BR /&gt;WRMSR(IA32_APERF, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Apr 2020 08:42:12 GMT</pubDate>
    <dc:creator>penhoat__joel</dc:creator>
    <dc:date>2020-04-07T08:42:12Z</dc:date>
    <item>
      <title>find p-states heuristic</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/find-p-states-heuristic/m-p/1157503#M6965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;"Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3 (3A, 3B, 3C &amp;amp; 3D): System Programming Guide" gives an example to determine the target p-state (see Example 14-1. Determine Target P-state From Hardware Coordinated Feedback).&lt;/P&gt;&lt;P&gt;The proposed heuristic is based the function "FindPstate".&lt;/P&gt;&lt;P&gt;Do you know an example of such function. The pseudocode would be helpful to understand such function.&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;joel penhoat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 14-1. Determine Target P-state From Hardware Coordinated Feedback&lt;/P&gt;&lt;P&gt;DWORD PercentBusy; // Percentage of processor time not idle.&lt;BR /&gt;// Measure “PercentBusy“ during previous sampling window.&lt;BR /&gt;// Typically, “PercentBusy“ is measure over a time scale suitable for&lt;BR /&gt;// power management decisions&lt;BR /&gt;//&lt;BR /&gt;// RDMSR of MCNT and ACNT should be performed without delay.&lt;BR /&gt;// Software needs to exercise care to avoid delays between&lt;BR /&gt;// the two RDMSRs (for example, interrupts).&lt;BR /&gt;MCNT = RDMSR(IA32_MPERF);&lt;BR /&gt;ACNT = RDMSR(IA32_APERF);&lt;BR /&gt;// PercentPerformance indicates the percentage of the processor&lt;BR /&gt;// that is in use. The calculation is based on the PercentBusy,&lt;BR /&gt;// that is the percentage of processor time not idle and the P-state&lt;BR /&gt;// hardware coordinated feedback using the ACNT/MCNT ratio.&lt;BR /&gt;// Note that both values need to be calculated over the same&lt;/P&gt;&lt;P&gt;// time window.&lt;BR /&gt;PercentPerformance = PercentBusy * (ACNT/MCNT);&lt;BR /&gt;// This example does not cover the additional logic or algorithms&lt;BR /&gt;// necessary to coordinate multiple logical processors to a target P-state.&lt;BR /&gt;TargetPstate = FindPstate(PercentPerformance);&lt;BR /&gt;if (TargetPstate ≠ currentPstate) {&lt;BR /&gt;SetPState(TargetPstate);&lt;BR /&gt;}&lt;BR /&gt;// WRMSR of MCNT and ACNT should be performed without delay.&lt;BR /&gt;// Software needs to exercise care to avoid delays between&lt;BR /&gt;// the two WRMSRs (for example, interrupts).&lt;BR /&gt;WRMSR(IA32_MPERF, 0);&lt;BR /&gt;WRMSR(IA32_APERF, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2020 08:42:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/find-p-states-heuristic/m-p/1157503#M6965</guid>
      <dc:creator>penhoat__joel</dc:creator>
      <dc:date>2020-04-07T08:42:12Z</dc:date>
    </item>
  </channel>
</rss>

