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

Cannot register Governor driver and CPU-FREQ driver on Proxmox with 2x Intel XEON 26xx v3 #402

Closed buglantiss closed 1 year ago

buglantiss commented 1 year ago

Hello,

As described in the title - I can't register Governor driver nor CPU-FREQ driver via corefreq-cli. In both cases a message "No such device" is shown. Tried with command line parameters during modprobe - the drivers are not registered either.

GRUB command line is as follows: GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt pcie_aspm=off pcie_acs_override=downstream,multifunction mitigations=off vfio-pci.ids=10de:1e84,10de:10f8,10de:1ad8 modprobe.blacklist=intel_cstate,acpi_cpufreq,pcc_cpufreq idle=halt intel_idle.max_cstate=0 cpufreq.off=1"

According to FAQ decribed in README.md, I followed this guidelines:

  • Q: How to solely control the P-States or the HWP Performance States ?

    A1: Without the Kernel cpufreq framework (aka CONFIG_CPU_FREQ), CoreFreq will take the full control over P-States. This allow the User to select a capped frequency from the UI, either per Core, either for the whole Processor.

    A2: With cpufreq built into Kernel, allow CoreFreq to register as a cpufreq driver. In the Kernel boot command line, two ways: **1. disable cpufreq with the Kernel parameter cpufreq.off=1

    1. blacklist any P-state driver; such as: modprobe.blacklist=acpi_cpufreq,pcc_cpufreq intel_pstate=disable**
    • hardware CPPC (MSR registers) <- Ignored this since I've got Intel CPUs initcall_blacklist=amd_pstate_init

    • firmware CPPC (ACPI registers) <- Ignored this since I've got Intel CPUs amd_pstate.shared_mem=0 and/or initcall_blacklist=acpi_cpufreq_init

    1. load the CoreFreq driver with its Register_CPU_Freq parameter: insmod corefreqk.ko Register_CPU_Freq=1
  • Q: Governor is missing in Kernel window even after a successful registration.

    A: When Registrations are done through the UI, they have to be done in the following order:

    1. Clock Source
    2. Governor driver
    3. CPU-FREQ driver
    4. CPU-IDLE driver
    5. CPU-IDLE route

So afterr boot up I modprobe corefreqk Register_CPU_Freq=1, start corefreqd & and then run corefreq-cli, but I still cannot use all the features of this driver. I appreciate in advance all the help you provide.

Regards, R.

cyring commented 1 year ago

Hello,

Can you show me what you get from corefreq-cli -k

buglantiss commented 1 year ago

Meanwhile I changed GRUB cmd line parameters to: GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt pcie_aspm=off pcie_acs_override=downstream,multifunction mitigations=off vfio-pci.ids=10de:1e84,10de:10f8,10de:1ad8 cpufreq.off=1 nmi_watchdog=0 initcall_blacklist=sysfb_init"

The result of corefreq-cli -k is as follows:

obraz

cyring commented 1 year ago

Also have a look to CoreFreq as the Clock Source, CPU Freq and CPU Idle driver in the Wiki.

Don't follow cpufreq.off=1 (my mistake in Readme.md)

It prevents any driver to register afterwards, including corefreqk.ko !

So you have to reach the point where the CPU-Freq framework is enabled in the kernel but no driver has registered to it yet. Missing should be displayed first then you can register CoreFreq

buglantiss commented 1 year ago

Thanks,

I have followed your instructions and CoreFreq got control over Governor & CPU Idle driver. However I still cannot get the control on CPU-Freq driver. Whenever 'intel_pstate=disable' is set CPU-Freq is being controlled by acpi_cpufreq. The module is absent in my system, though...

obraz

I found that acpi-cpufreq is registered as scaling driver...

obraz ... but don't know how can I get rid of it... :/

More help needed and appreciated.

Regards, R.

cyring commented 1 year ago

If unloading the acpi driver is refused then it may has not been built as a module but it is an in-tree driver which is sticky.

The trick is to blacklist its init function, try to boot with this parameter:

initcall_blacklist=acpi_cpufreq_init
buglantiss commented 1 year ago

initcall_blacklist=acpi_cpufreq_init

This parameter has done the trick! You are awesome :) Thank you!

obraz obraz

Best regards, R.

cyring commented 1 year ago
initcall_blacklist=acpi_cpufreq_init

This parameter has done the trick! You are awesome :) Thank you!

obraz obraz

Best regards, R.

Your welcome. Enjoy CoreFreq

cyring commented 1 year ago

Doc updated.