cyring / CoreFreq

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

[SOLVED] [Skylake-X] Terminal hangs during module insertion #374

Closed cyring closed 1 year ago

cyring commented 1 year ago

Now the compilation passes. But the terminal hangs during module insertion. The CPU architecture of my computer is skylake-X. Thank again for looking at this issue. I will roll back to older version.

Originally posted by @wjc404 in https://github.com/cyring/CoreFreq/issues/373#issuecomment-1312450134

Well, I found nothing related in /var/log/syslog (actually the logging was stopped until I press the restart button).

The version v1.90 RC1(commit https://github.com/cyring/CoreFreq/commit/a1540153123db1b2614dcc2d8cddede1be3a42cb) works fine without crash.

cyring commented 1 year ago

@wjc404 Hello

Can you try to read the following MSR on your Skylake/X ?

## MSR_SKL_CORE_PERF_LIMIT_REASONS
rdmsr -ax 0x0000064f

## MSR_GRAPHICS_PERF_LIMIT_REASONS
rdmsr -ax 0x000006b0

## MSR_RING_PERF_LIMIT_REASONS
rdmsr -ax 0x000006b1

Thank you

wjc404 commented 1 year ago
request result note
0x0000064f 0xe1848080 same for all cores
0x000006b0 cannot read for all cores
0x000006b1 0x0 same for all cores
cyring commented 1 year ago

@wjc404 Thank you for the MSR tests.

https://github.com/cyring/CoreFreq/blob/c761e4657bd29d37fcb73ef07eb20c6a458b05d2/corefreqk.c#L11818

/*TODO(Unsolved)
    GraphicsPerfLimitReasons(Core);
*/
    RingPerfLimitReasons(Core);

https://github.com/cyring/CoreFreq/blob/c761e4657bd29d37fcb73ef07eb20c6a458b05d2/corefreqk.c#L16726

/*TODO(Unsolved)
        Monitor_GraphicsPerfLimitReasons(PUBLIC(RO(Proc)));
*/
        Monitor_RingPerfLimitReasons(PUBLIC(RO(Proc)));
wjc404 commented 1 year ago

Succeeded, nothing wrong with corefreq-cli.

  • If branch does not crash, can you then allow MSR_RING_PERF_LIMIT_REASONS by replacing comments in the following lines:

https://github.com/cyring/CoreFreq/blob/c761e4657bd29d37fcb73ef07eb20c6a458b05d2/corefreqk.c#L11818

/*TODO(Unsolved)
  GraphicsPerfLimitReasons(Core);
*/
  RingPerfLimitReasons(Core);

https://github.com/cyring/CoreFreq/blob/c761e4657bd29d37fcb73ef07eb20c6a458b05d2/corefreqk.c#L16726

/*TODO(Unsolved)
      Monitor_GraphicsPerfLimitReasons(PUBLIC(RO(Proc)));
*/
      Monitor_RingPerfLimitReasons(PUBLIC(RO(Proc)));

Also succeeded.

cyring commented 1 year ago

@wjc404 Thank you for your contribution.

Do you mind to run the current development branch develop for non regression tests ?

Any CLI outputs and screenshots are greatly appreciated. Such as CPU-support

wjc404 commented 1 year ago

Well, maybe there's no need to call Monitor_GraphicsPerfLimitReasons and GraphicsPerfLimitReasons for skylake-X processors, since they don't have built-in graphics. I will test after this fix is taken into the target branch.

cyring commented 1 year ago

Well, maybe there's no need to call Monitor_GraphicsPerfLimitReasons and GraphicsPerfLimitReasons for skylake-X processors, since they don't have built-in graphics.

Exactly. And I'm looking for an iGPU discriminant to jump around or not GraphicsPerfLimitReasons in code.

CSR registers for capabilities may tell if a Graphic is present or not:

https://github.com/cyring/CoreFreq/blob/35b504f3a26c6e2a1d18fd1a6f197e3881a3027b/intel_reg.h#L4394

But this required to test various Skylake-{X} and successors for the validity of such bit.

I will test after this fix is taken into the target branch.

Are we closing the issue ?

cyring commented 1 year ago

Master branch is released with new version: can you tell if it works OK ?

cyring commented 1 year ago

Hello,

I need your processor for ACPI testings!

Based on develop branch, can you change the code of the function Query_Skylake_X as below https://github.com/cyring/CoreFreq/blob/e41ec49b5f3ff9085f5c4396ce236182fc8f2711/corefreqk.c#L6876

static void Query_Skylake_X(unsigned int cpu)
{
    if (PUBLIC(RO(Proc))->Features.Power.EAX.TurboIDA)
    {
        PUBLIC(RO(Proc))->Features.Uncore_Unlock = 1;
    }
    Skylake_X_Platform_Info(cpu);
    HyperThreading_Technology();
    Haswell_Uncore_Ratio(NULL);
    Intel_PowerInterface();
    Intel_Hardware_Performance();

    if (cpu == PUBLIC(RO(Proc))->Service.Core) {
        Read_ACPI_PCT_Registers(cpu);
        Read_ACPI_PSS_Registers(cpu);
        Read_ACPI_PPC_Registers(cpu);
        Read_ACPI_CST_Registers(cpu);
    }
}

Then rebuild, start CoreFreq, and post the output of corefreq-cli -s

Thank you