cyring / CoreFreq

CoreFreq : CPU monitoring and tuning software designed for 64-bit processors.
https://www.cyring.fr
GNU General Public License v2.0
2k stars 126 forks source link

Support for i5-4200U #184

Closed Arthav24 closed 3 years ago

Arthav24 commented 4 years ago

Hey, Thanks for the awesome tool. I have added the tag at wiki page but could not add gist page please do the honors. here are some screenshots **removed screenshots

Thanks

Arthav24 commented 4 years ago
sudo ./corefreq-cli -s
[sudo] password for arthav: 
Processor                             [Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz]
|- Architecture                                          [Haswell/Ultra Low TDP]
|- Vendor ID                                                      [GenuineIntel]
|- Microcode                                                        [        37]
|- Signature                                                           [  06_45]
|- Stepping                                                            [      1]
|- Online CPU                                                          [  4/  4]
|- Base Clock                                                          [ 99.868]
|- Frequency            (MHz)                      Ratio                        
                 Min    798.95                    [   8 ]                       
                 Max   2296.97                    [  23 ]                       
|- Factory                                                             [100.000]
                       1600                       [  16 ]                       
|- Performance                                                                  
   |- OSPM                                                                      
                 TGT   1498.02                    <  15 >                       
|- Turbo Boost                                                         [ UNLOCK]
                  1C   2596.57                    <  26 >                       
                  2C   2296.97                    <  23 >                       
                  3C   2296.97                    <  23 >                       
                  4C   2296.97                    <  23 >                       
|- Uncore                                                              [   LOCK]
                 Min    798.95                    [   8 ]                       
                 Max   2296.97                    [  23 ]                       
|- TDP                                                           Level [  0:3  ]
   |- Programmable                                                     [ UNLOCK]
   |- Configuration                                                    [ UNLOCK]
   |- Turbo Activation                                                 [ UNLOCK]
             Nominal   1597.89                    [  16 ]                       
              Level1    798.95                    [   8 ]                       
              Level2   2296.97                    [  23 ]                       
               Turbo   1498.02                    [  15 ]                       

Instruction Set Extensions                                                      
|- 3DNow!/Ext [N/N]          ADX [N]          AES [Y]  AVX/AVX2 [Y/Y] 
|- AVX512-F     [N]    AVX512-DQ [N]  AVX512-IFMA [N]   AVX512-PF [N] 
|- AVX512-ER    [N]    AVX512-CD [N]    AVX512-BW [N]   AVX512-VL [N] 
|- AVX512-VBMI  [N] AVX512-VBMI2 [N]  AVX512-VNMI [N]  AVX512-ALG [N] 
|- AVX512-VPOP  [N] AVX512-VNNIW [N] AVX512-FMAPS [N] AVX512-VP2I [N] 
|- AVX512-BF16  [N]  BMI1/BMI2 [Y/Y]      CLFLUSH [Y]        CMOV [Y] 
|- CMPXCHG8B    [Y]   CMPXCHG16B [Y]         F16C [Y]         FPU [Y] 
|- FXSR         [Y]    LAHF/SAHF [Y]    MMX/Ext [Y/N]  MONITOR/X[Y/N] 
|- MOVBE        [Y]    SERIALIZE [N]    PCLMULQDQ [Y]      POPCNT [Y] 
|- RDRAND       [Y]       RDSEED [N]       RDTSCP [Y]         SEP [Y] 
|- SGX          [N]          SSE [Y]         SSE2 [Y]        SSE3 [Y] 
|- SSSE3        [Y]  SSE4.1/4A [Y/N]       SSE4.2 [Y]     SYSCALL [Y] 

Features                                                                        
|- 1 GB Pages Support                                      1GB-PAGES   [Capable]
|- Advanced Configuration & Power Interface                     ACPI   [Capable]
|- Advanced Programmable Interrupt Controller                   APIC   [Capable]
|- Core Multi-Processing                                  CMP Legacy   [Missing]
|- L1 Data Cache Context ID                                  CNXT-ID   [Missing]
|- Direct Cache Access                                           DCA   [Missing]
|- Debugging Extension                                            DE   [Capable]
|- Debug Store & Precise Event Based Sampling               DS, PEBS   [Capable]
|- CPL Qualified Debug Store                                  DS-CPL   [Capable]
|- 64-Bit Debug Store                                         DTES64   [Capable]
|- Fast-String Operation                                Fast-Strings   [Capable]
|- Fused Multiply Add                                     FMA | FMA4   [Capable]
|- Hardware Lock Elision                                         HLE   [Missing]
|- Long Mode 64 bits                                       IA64 | LM   [Capable]
|- LightWeight Profiling                                         LWP   [Missing]
|- Machine-Check Architecture                                    MCA   [Capable]
|- Memory Protection Extensions                                  MPX   [Missing]
|- Model Specific Registers                                      MSR   [Capable]
|- Memory Type Range Registers                                  MTRR   [Capable]
|- OS-Enabled Ext. State Management                          OSXSAVE   [Capable]
|- Physical Address Extension                                    PAE   [Capable]
|- Page Attribute Table                                          PAT   [Capable]
|- Pending Break Enable                                          PBE   [Capable]
|- Process Context Identifiers                                  PCID   [Capable]
|- Perfmon and Debug Capability                                 PDCM   [Capable]
|- Page Global Enable                                            PGE   [Capable]
|- Page Size Extension                                           PSE   [Capable]
|- 36-bit Page Size Extension                                  PSE36   [Capable]
|- Processor Serial Number                                       PSN   [Missing]
|- Resource Director Technology/PQE                            RDT-A   [Missing]
|- Resource Director Technology/PQM                            RDT-M   [Missing]
|- Restricted Transactional Memory                               RTM   [Missing]
|- Safer Mode Extensions                                         SMX   [Missing]
|- Self-Snoop                                                     SS   [Capable]
|- Supervisor-Mode Access Prevention                            SMAP   [Missing]
|- Supervisor-Mode Execution Prevention                         SMEP   [Capable]
|- Time Stamp Counter                                            TSC [Invariant]
|- Time Stamp Counter Deadline                          TSC-DEADLINE   [Capable]
|- TSX Force Abort MSR Register                            TSX-ABORT   [Missing]
|- TSX Suspend Load Address Tracking                       TSX-LDTRK   [Missing]
|- User-Mode Instruction Prevention                             UMIP   [Missing]
|- Virtual Mode Extension                                        VME   [Capable]
|- Virtual Machine Extensions                                    VMX   [Capable]
|- Extended xAPIC Support                                     x2APIC   [Missing]
|- Execution Disable Bit Support                              XD-Bit   [Capable]
|- XSAVE/XSTOR States                                          XSAVE   [Capable]
|- xTPR Update Control                                          xTPR   [Capable]
Mitigation mechanisms                                                           
|- Indirect Branch Restricted Speculation                       IBRS   [Capable]
|- Indirect Branch Prediction Barrier                           IBPB   [Capable]
|- Single Thread Indirect Branch Predictor                     STIBP   [Capable]
|- Speculative Store Bypass Disable                             SSBD   [Capable]
|- Writeback & invalidate the L1 data cache                L1D-FLUSH   [Capable]
|- Hypervisor - No flush L1D on VM entry            L1DFL_VMENTRY_NO   [Missing]
|- Architectural - Buffer Overwriting                       MD-CLEAR   [Capable]
|- Architectural - Rogue Data Cache Load                     RDCL_NO   [Missing]
|- Architectural - Enhanced IBRS                            IBRS_ALL   [Missing]
|- Architectural - Return Stack Buffer Alternate                RSBA   [Missing]
|- Architectural - Speculative Store Bypass                   SSB_NO   [Missing]
|- Architectural - Microarchitectural Data Sampling           MDS_NO   [Missing]
|- Architectural - TSX Asynchronous Abort                     TAA_NO   [Missing]
|- Architectural - Page Size Change MCE               PSCHANGE_MC_NO   [Missing]

Technologies                                                                    
|- System Management Mode                                   SMM-Dual       [ ON]
|- Hyper-Threading                                               HTT       [ ON]
|- SpeedStep                                                    EIST       < ON>
|- Dynamic Acceleration                                          IDA       [ ON]
|- Turbo Boost                                                 TURBO       < ON>
|- Virtualization                                                VMX       [ ON]
   |- I/O MMU                                                   VT-d       [OFF]
   |- Hypervisor                                                           [OFF]

Performance Monitoring                                                          
|- Version                                                        PM       [  3]
|- Counters:          General                   Fixed                           
|                     4 x 48 bits             3 x 48 bits                       
|- Enhanced Halt State                                           C1E       < ON>
|- C1 Auto Demotion                                              C1A       < ON>
|- C3 Auto Demotion                                              C3A       < ON>
|- C1 UnDemotion                                                 C1U       < ON>
|- C3 UnDemotion                                                 C3U       < ON>
|- Frequency ID control                                          FID       [OFF]
|- Voltage ID control                                            VID       [OFF]
|- P-State Hardware Coordination Feedback                MPERF/APERF       [ ON]
|- Hardware-Controlled Performance States                        HWP       [OFF]
|- Hardware Duty Cycling                                         HDC       [OFF]
|- Package C-State                                                              
   |- Configuration Control                                   CONFIG   [   LOCK]
   |- Lowest C-State                                           LIMIT   [     10]
   |- I/O MWAIT Redirection                                  IOMWAIT   [ Enable]
   |- Max C-State Inclusion                                    RANGE   [      0]
|- MONITOR/MWAIT                                                                
   |- State index:    #0    #1    #2    #3    #4    #5    #6    #7              
   |- Sub C-State:     0     2     1     2     4     1     1     1              
|- Core Cycles                                                         [Capable]
|- Instructions Retired                                                [Capable]
|- Reference Cycles                                                    [Capable]
|- Last Level Cache References                                         [Capable]
|- Last Level Cache Misses                                             [Capable]
|- Branch Instructions Retired                                         [Capable]
|- Branch Mispredicts Retired                                          [Capable]

Power & Thermal                                                                 
|- Clock Modulation                                             ODCM   <Disable>
   |- DutyCycle                                                        [ 50.00%]
|- Power Management                                         PWR MGMT   [   LOCK]
   |- Energy Policy                                        Bias Hint   <      6>
   |- Energy Policy                                          HWP EPP   [      0]
|- Junction Temperature                                        TjMax   [  0:100]
|- Digital Thermal Sensor                                        DTS   [Capable]
|- Power Limit Notification                                      PLN   [Capable]
|- Package Thermal Management                                    PTM   [Capable]
|- Thermal Monitor 1                                             TM1   [ Enable]
|- Thermal Monitor 2                                             TM2   [Capable]
|- Thermal Design Power                                          TDP   [     15]
   |- Minimum Power                                              Min   [Missing]
   |- Maximum Power                                              Max   [Missing]
|- Units                                                                        
   |- Power                                               watt   [  0.125000000]
   |- Energy                                             joule   [  0.000061035]
   |- Window                                            second   [  0.000976562]
cyring commented 4 years ago

Thanks I will add a page.

Looks like there is remaining work w/ this Haswell ULT :

cyring commented 4 years ago

Here the page. Thank you.

I would suggest you remove & purge your screenshots above as they show your credentials

Arthav24 commented 4 years ago

ohh yess Sorry I should take care of it ! my bad. I will remove them. Do let me know how could I help you more with Corefreq :)

cyring commented 4 years ago

Hello

Memory Controller

Thank you

Arthav24 commented 4 years ago
sudo ./corefreq-cli -M
                         Lynx Point-M  [ A04]                         
Controller #0                                           Dual Channel  
 Bus Rate  5000 MT/s      Bus Speed 4988 MT/s     DRAM Speed 1600 MHz 

 Cha    CL  RCD   RP  RAS  RRD  RFC   WR RTPr WTPr  FAW  B2B  CWL Rate
  #0    11    0    0    0    0  208    0    0    0    0    0    8   1N
  #1    11    0    0    0    0  208    0    0    0    0    0    8   1N
      ddWR drWR srWR ddRW drRW srRW ddRR drRR srRR ddWW drWW srWW  ECC
  #0     4    3   20   11   11   11    6    6    4    7    7    4   0 
  #1     4    3   20   11   11   11    6    6    4    7    7    4   0 

 DIMM Geometry for channel #0                                         
      Slot Bank Rank     Rows   Columns    Memory Size (MB)           
       #0     4    2     16384      1024           4096               
 DIMM Geometry for channel #1                                         
      Slot Bank Rank     Rows   Columns    Memory Size (MB)           
       #0     4    2     16384      1024           4096 

I have this corsair DDR3L RAM installed (https://www.amazon.in/gp/product/B00G40TB6E/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) in 2 x 4GB 4GB Module (1x4GB) DDR3L 1600MHz SODIMM 1600MHz, 11-11-11-28 latency

Screenshot from 2020-05-21 10-22-19 Screenshot from 2020-05-21 10-23-09

cyring commented 4 years ago

Thanks, I'll check how to improve RCD-RP-RAS. I remember those were missing in datasheet.

Uncore is still tagged as experimental (b/c I had no hardware to test with) https://github.com/cyring/CoreFreq/blob/d4483233be53413c99e1e68411e8e38e4de4bdaf/corefreqk.c#L8039 To test the Uncore counter, you have to start the driver with the Experimental mode enabled :

insmod corefreqk.ko Experimental=1

Be prepared for a potential processor crash. Save, close your files before shooting the driver.

HOT is light on. It means processor has pending events, usually thermal throttling bit has been raised. Press [H] and clear those events. If processor load is idle, thermal event should stay cleared ; and CPU temperature not displayed in red

cyring commented 4 years ago
void Query_HSW_IMC(void __iomem *mchmap)
{   /*Source: Desktop 4th & 5th Generation Intel® Core™ Processor Family.*/
    unsigned short cha, dimmCount[2];

    Proc->Uncore.CtrlCount = 1;

    Proc->Uncore.MC[0].SNB.MAD0.value = readl(mchmap + 0x5004);
    Proc->Uncore.MC[0].SNB.MAD1.value = readl(mchmap + 0x5008);

    Proc->Uncore.MC[0].ChannelCount = 0;

    dimmCount[0] = (Proc->Uncore.MC[0].SNB.MAD0.Dimm_A_Size > 0)
             + (Proc->Uncore.MC[0].SNB.MAD0.Dimm_B_Size > 0);
    dimmCount[1] = (Proc->Uncore.MC[0].SNB.MAD1.Dimm_A_Size > 0)
             + (Proc->Uncore.MC[0].SNB.MAD1.Dimm_B_Size > 0);

    for (cha = 0; cha < 2; cha++)
        Proc->Uncore.MC[0].ChannelCount += (dimmCount[cha] > 0);

    for (cha = 0; cha < Proc->Uncore.MC[0].ChannelCount; cha++)
    {
        unsigned int R4C00 = readl(mchmap + 0x4c00);
        unsigned int R4C10 = readl(mchmap + 0x4c10);
        printk("CoreFreq: R4C00[%0x] R4C10[%0x]\n", R4C00, R4C10);

/*TODO( Unsolved: What is the channel #1 'X' factor of Haswell registers ? )
        Proc->Uncore.MC[0].Channel[cha].HSW.Timing.value =
                    readl(mchmap + 0x4c04 + X * cha);
        Proc->Uncore.MC[0].Channel[cha].HSW.Rank_A.value =
                    readl(mchmap + 0x4c08 + X * cha);
        Proc->Uncore.MC[0].Channel[cha].HSW.Rank_B.value =
                    readl(mchmap + 0x4c0c + X * cha);
        Proc->Uncore.MC[0].Channel[cha].HSW.Rank.value =
                    readl(mchmap + 0x4c14 + X * cha);
        Proc->Uncore.MC[0].Channel[cha].HSW.Refresh.value =
                    readl(mchmap + 0x4e98 + X * cha);
*/
        Proc->Uncore.MC[0].Channel[cha].HSW.Timing.value =
                    readl(mchmap + 0x4c04);

        Proc->Uncore.MC[0].Channel[cha].HSW.Rank_A.value =
                    readl(mchmap + 0x4c08);

        Proc->Uncore.MC[0].Channel[cha].HSW.Rank_B.value =
                    readl(mchmap + 0x4c0c);

        Proc->Uncore.MC[0].Channel[cha].HSW.Rank.value =
                    readl(mchmap + 0x4c14);

        Proc->Uncore.MC[0].Channel[cha].HSW.Refresh.value =
                    readl(mchmap + 0x4e98);
    }
    /* Is Dual DIMM Per Channel Disable ? */
    Proc->Uncore.MC[0].SlotCount = (Proc->Uncore.Bus.SNB_Cap.DDPCD == 1) ?
                    1 : Proc->Uncore.MC[0].ChannelCount;

    Query_Turbo_TDP_Config(mchmap);
}

Thanks

cyring commented 4 years ago

Hello, Any return for above Uncore test and IMC debug Regards

Arthav24 commented 4 years ago

Thanks, I'll check how to improve RCD-RP-RAS. I remember those were missing in datasheet.

Uncore is still tagged as experimental (b/c I had no hardware to test with)

https://github.com/cyring/CoreFreq/blob/d4483233be53413c99e1e68411e8e38e4de4bdaf/corefreqk.c#L8039

To test the Uncore counter, you have to start the driver with the Experimental mode enabled :

insmod corefreqk.ko Experimental=1

Be prepared for a potential processor crash. Save, close your files before shooting the driver.

HOT is light on. It means processor has pending events, usually thermal throttling bit has been raised. Press [H] and clear those events. If processor load is idle, thermal event should stay cleared ; and CPU temperature not displayed in red Screenshot from 2020-05-25 17-02-05

Screenshot from 2020-05-25 17-02-27 I cleared all events using H and also insmod corefreqk.ko Experimental=1

Arthav24 commented 4 years ago
* Can you replace function `Query_HSW_IMC` with the following code in source file `corefreqk.c` :
  https://github.com/cyring/CoreFreq/blob/d4483233be53413c99e1e68411e8e38e4de4bdaf/corefreqk.c#L2826
void Query_HSW_IMC(void __iomem *mchmap)
{ /*Source: Desktop 4th & 5th Generation Intel® Core™ Processor Family.*/
  unsigned short cha, dimmCount[2];

  Proc->Uncore.CtrlCount = 1;

  Proc->Uncore.MC[0].SNB.MAD0.value = readl(mchmap + 0x5004);
  Proc->Uncore.MC[0].SNB.MAD1.value = readl(mchmap + 0x5008);

  Proc->Uncore.MC[0].ChannelCount = 0;

  dimmCount[0] = (Proc->Uncore.MC[0].SNB.MAD0.Dimm_A_Size > 0)
           + (Proc->Uncore.MC[0].SNB.MAD0.Dimm_B_Size > 0);
  dimmCount[1] = (Proc->Uncore.MC[0].SNB.MAD1.Dimm_A_Size > 0)
           + (Proc->Uncore.MC[0].SNB.MAD1.Dimm_B_Size > 0);

  for (cha = 0; cha < 2; cha++)
      Proc->Uncore.MC[0].ChannelCount += (dimmCount[cha] > 0);

  for (cha = 0; cha < Proc->Uncore.MC[0].ChannelCount; cha++)
  {
      unsigned int R4C00 = readl(mchmap + 0x4c00);
      unsigned int R4C10 = readl(mchmap + 0x4c10);
      printk("CoreFreq: R4C00[%0x] R4C10[%0x]\n", R4C00, R4C10);

/*TODO( Unsolved: What is the channel #1 'X' factor of Haswell registers ? )
      Proc->Uncore.MC[0].Channel[cha].HSW.Timing.value =
                  readl(mchmap + 0x4c04 + X * cha);
      Proc->Uncore.MC[0].Channel[cha].HSW.Rank_A.value =
                  readl(mchmap + 0x4c08 + X * cha);
      Proc->Uncore.MC[0].Channel[cha].HSW.Rank_B.value =
                  readl(mchmap + 0x4c0c + X * cha);
      Proc->Uncore.MC[0].Channel[cha].HSW.Rank.value =
                  readl(mchmap + 0x4c14 + X * cha);
      Proc->Uncore.MC[0].Channel[cha].HSW.Refresh.value =
                  readl(mchmap + 0x4e98 + X * cha);
*/
      Proc->Uncore.MC[0].Channel[cha].HSW.Timing.value =
                  readl(mchmap + 0x4c04);

      Proc->Uncore.MC[0].Channel[cha].HSW.Rank_A.value =
                  readl(mchmap + 0x4c08);

      Proc->Uncore.MC[0].Channel[cha].HSW.Rank_B.value =
                  readl(mchmap + 0x4c0c);

      Proc->Uncore.MC[0].Channel[cha].HSW.Rank.value =
                  readl(mchmap + 0x4c14);

      Proc->Uncore.MC[0].Channel[cha].HSW.Refresh.value =
                  readl(mchmap + 0x4e98);
  }
  /* Is Dual DIMM Per Channel Disable ? */
  Proc->Uncore.MC[0].SlotCount = (Proc->Uncore.Bus.SNB_Cap.DDPCD == 1) ?
                  1 : Proc->Uncore.MC[0].ChannelCount;

  Query_Turbo_TDP_Config(mchmap);
}
* Then rebuild, stop all, reload all and post the traces in kernel log
rmmod corefreqk.ko
make clean all
insmod corefreqk.ko
dmesg | grep CoreFreq

Thanks

output of dmesg | grep CoreFreq

[  191.079817] CoreFreq(0:1): Processor [ 06_45] Architecture [Haswell/Ultra Low TDP] SMT [4/4]
[  621.307534] CoreFreq: Unload
[  789.209100] CoreFreq(0:1): Processor [ 06_45] Architecture [Haswell/Ultra Low TDP] SMT [4/4]
[  789.209207] CoreFreq: R4C00[1586716b] R4C10[1007]
[  789.209210] CoreFreq: R4C00[1586716b] R4C10[1007]
cyring commented 4 years ago

I cleared all events using H and also insmod corefreqk.ko Experimental=1

Thus thermal issues are still there. Although you press to clear each lighted events, the CPU temperatures remain RED ; it means the thermal register sticky bits are recurring. 2020-05-25-143019_804x644_scrot

cyring commented 4 years ago

I cleared all events using H and also insmod corefreqk.ko Experimental=1

Thus thermal issues are still there. Although you press to clear each lighted events, the CPU temperatures remain RED ; it means the thermal register sticky bits are recurring. 2020-05-25-143019_804x644_scrot

cyring commented 4 years ago
cyring commented 4 years ago

Hello,

Can you now switch to the develop branch of CoreFreq ; unload, rebuild all ; and test for the timings tRP , tRRD , tRCD and tRAS

Plz show me a screenshot of the DIMM timings output

Arthav24 commented 4 years ago

yess I will do that give me some time actually that laptop isn't mine. will post results in some time. and for uncore i think I was using master branch ! should I be using the develop branch for Uncore test too ?

Arthav24 commented 4 years ago
 dmesg | grep CoreFreq
[  680.644970] CoreFreq(2:3): Processor [ 06_45] Architecture [Haswell/Ultra Low TDP] SMT [4/4]

Screenshot from 2020-05-26 12-40-45

Arthav24 commented 4 years ago

I noticed that Hot was getting triggered due to power limitation and that too because on battery power so. uncore testing (replace the query_hsw_imc in develop branch)

dmesg | grep CoreFreq
[  680.644970] CoreFreq(2:3): Processor [ 06_45] Architecture [Haswell/Ultra Low TDP] SMT [4/4]
[  976.849350] CoreFreq: Unload
[ 1057.716502] CoreFreq(2:3): Processor [ 06_45] Architecture [Haswell/Ultra Low TDP] SMT [4/4]
[ 1057.716618] CoreFreq: R4C00[1586716b] R4C10[1007]
[ 1057.716621] CoreFreq: R4C00[1586716b] R4C10[1007]

loaded driver with Experimental=1 Screenshot from 2020-05-26 12-49-02

Screenshot from 2020-05-26 12-49-21

cyring commented 4 years ago

IMC looks better, thanks I just missed the offset of registers for timings WR, FAW and B2B

You can stay on the development branch, and don't need to edit code any more. Changes have been back ported. If you have other tools, BIOS to read the above timings ? (not the SPD but the current configured timings)

cyring commented 4 years ago

Another request: can you check if Power management features work ?

  1. Enable the Experimental mode
  2. Go to the window Power & Thermal
  3. Check if you can enable the Clock Modulation ?
  4. If enabled then change the Duty Cycle to another percent and stress Cores to observe a clock limitation
  5. Disable Clock Modulation , while stressing, and check if Clock is restored to nominal ? 2020-05-26-114511_799x644_scrot
cyring commented 4 years ago
cyring commented 4 years ago
Arthav24 commented 4 years ago

Another request: can you check if Power management features work ?

1. Enable the Experimental mode

2. Go to the window `Power & Thermal`

3. Check if you can enable the `Clock Modulation` ?

4. If enabled then change the `Duty Cycle` to another percent and stress Cores to observe a clock limitation

5. Disable `Clock Modulation` , while stressing, and check if Clock is restored to nominal ?
   ![2020-05-26-114511_799x644_scrot](https://user-images.githubusercontent.com/11563789/82886266-95531a80-9f46-11ea-80c6-f34bd66f3e37.png)

yes the Clock Modulation works. while running conic 2 plane compute I observed the frequencies. changing the percentage changed the frequency and disable it, frequency is back to normal. :+1: Screenshot from 2020-05-27 10-10-45 Screenshot from 2020-05-27 10-13-46

Arthav24 commented 4 years ago
* Update: If enabling the Uncore counter crashes Processor or counter value remains at zero ; please try this code:
  https://github.com/cyring/CoreFreq/blob/73a5056db660fd865af273af62b35c7bee2230b1/corefreqk.c#L7294
#define PKG_Counters_Haswell_ULT(Core, T)             \
({                                    \
    if (Proc->Registration.Experimental) {                \
  RDTSCP_COUNTERx7(Proc->Counter[T].PTSC,             \
          MSR_PKG_C2_RESIDENCY, Proc->Counter[T].PC02,    \
          MSR_PKG_C3_RESIDENCY, Proc->Counter[T].PC03,    \
          MSR_PKG_C6_RESIDENCY, Proc->Counter[T].PC06,    \
          MSR_PKG_C7_RESIDENCY, Proc->Counter[T].PC07,    \
          MSR_PKG_C8_RESIDENCY, Proc->Counter[T].PC08,    \
          MSR_PKG_C9_RESIDENCY, Proc->Counter[T].PC09,    \
          MSR_PKG_C10_RESIDENCY,Proc->Counter[T].PC10);   \
                                  \
  RDCOUNTER   (Proc->Counter[T].Uncore.FC0,           \
          MSR_SNB_UNCORE_PERF_FIXED_CTR0 );       \
    } else {                              \
  RDTSCP_COUNTERx7(Proc->Counter[T].PTSC,             \
          MSR_PKG_C2_RESIDENCY, Proc->Counter[T].PC02,    \
          MSR_PKG_C3_RESIDENCY, Proc->Counter[T].PC03,    \
          MSR_PKG_C6_RESIDENCY, Proc->Counter[T].PC06,    \
          MSR_PKG_C7_RESIDENCY, Proc->Counter[T].PC07,    \
          MSR_PKG_C8_RESIDENCY, Proc->Counter[T].PC08,    \
          MSR_PKG_C9_RESIDENCY, Proc->Counter[T].PC09,    \
          MSR_PKG_C10_RESIDENCY,Proc->Counter[T].PC10);   \
    }                                 \
})

then rebuild, reload all

pulled the develop branch but the uncore counter was stuck at 0. then changed the code snippet and results are below Screenshot from 2020-05-27 10-23-41 Screenshot from 2020-05-27 10-23-56

cyring commented 4 years ago

Thanks :100: Code pushed into the development branch.

cyring commented 3 years ago

Change done.