Closed eperezv closed 3 years ago
Yes, it has been such a mess in Kernel when one guy decided to change a function prototype.
I have tracked major kernel versions, before and after the change, in these code lines of the driver:
https://github.com/cyring/CoreFreq/blob/f6ba67a06676e3f83dfc4eeefb8b09683c39fc87/corefreqk.c#L9367
But I will need your help to adapt your kernel version, apparently 5.4.0
, to these build conditions.
Something like:
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) \
&& (LINUX_VERSION_CODE <= KERNEL_VERSION(5, 4, 25))) \
|| (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 3))
Ok. I can help :) Let me know how to do it. I am not sure if you are suggesting to replace the upper line (5, 4 ,19) by (5, 4, 0). I did it but nothing changed.
You are right. The kernel version is 5.4.0
Linux eduardo-PC 5.4.0-25-generic #29-Ubuntu SMP Fri Apr 17 15:06:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Ok. I can help :)
Thanks a lot
Let me know how to do it. I am not sure if you are suggesting to replace the upper line (5, 4 ,19) by (5, 4, 0). I did it but nothing changed.
You are right. The kernel version is 5.4.0
Linux eduardo-PC 5.4.0-25-generic #29-Ubuntu SMP Fri Apr 17 15:06:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
It looks like Ubuntu is back-porting changes into its LTS
The structure expected by whatever version is your Kernel is cpufreq_policy_data
I don't find such structure into the 5.4.0 mainstream
But appears in Linux LTS 5.4.19 then none in 5.5.0 and found again since 5.5.3
I'm virtualizing Ubuntu 19.10 Desktop ISO (b/c I'm an Archer) and CoreFreq builds OK
What is your Ubuntu ?
It looks like Ubuntu is back-porting changes into its LTS The structure expected by whatever version is your Kernel is
cpufreq_policy_data
I don't find such structure into the 5.4.0 mainstream But appears in Linux LTS 5.4.19 then none in 5.5.0 and found again since 5.5.3 What a mess.
I originally installed ubuntu 18.04 but upgraded to the 20.04 beta when it was released. I have been updating it since there. Linux 5.4.0 was the default kernel.
It looks like Ubuntu is back-porting changes into its LTS The structure expected by whatever version is your Kernel is
cpufreq_policy_data
I don't find such structure into the 5.4.0 mainstream But appears in Linux LTS 5.4.19 then none in 5.5.0 and found again since 5.5.3 What a mess.I originally installed ubuntu 18.04 but upgraded to the 20.04 beta when it was released. I have been updating it since there. Linux 5.4.0 was the default kernel.
Please mention it in your issue kernel -;) I'm so far trying to find/download a quick live CD of Ubuntu 20 to test and change code
It looks like Ubuntu is back-porting changes into its LTS The structure expected by whatever version is your Kernel is
cpufreq_policy_data
I don't find such structure into the 5.4.0 mainstream But appears in Linux LTS 5.4.19 then none in 5.5.0 and found again since 5.5.3 What a mess.I originally installed ubuntu 18.04 but upgraded to the 20.04 beta when it was released. I have been updating it since there. Linux 5.4.0 was the default kernel.
Please mention it in your issue title -;) I'm so far trying to find/download a quick live CD of Ubuntu 20 to test and change code
OK, Ubuntu 20 virtualized Quick workarround in these 2 files: https://github.com/cyring/CoreFreq/blob/f6ba67a06676e3f83dfc4eeefb8b09683c39fc87/corefreqk.h#L3485 https://github.com/cyring/CoreFreq/blob/f6ba67a06676e3f83dfc4eeefb8b09683c39fc87/corefreqk.c#L9367 replace conditions in both files with this single line
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
such as
then rebuild with make clean all
And what a surprise: Ubuntu 5.4.0.-21
is indeed 5.4.27
It works! thanks a lot
It works! thanks a lot
Please, show me CoreFreq screenshots of your dream 3960X Threadripper (This is the one I would like to have ...)
Especially please post the Topology corefreq-cli -s -m
What is your Cooling solution ?
But now, I am not sure if it is working properly. CPU is full load right now, and the frequences are weird. Don't you think so?
It works! thanks a lot
Please, show me CoreFreq screenshots of your dream 3960X Threadripper (This is the one I would like to have ...)
Especially please post the Topology
corefreq-cli -s -m
What is your Cooling solution ?
I am still testing it ;) It looks promising in some ffmpeg and DNA-assembly tools, but it is still soon. It was assembled with the Noctua NH U14S TR4-SP3. It was indicated as compatible (and I was afraid of liquid cooling), so I tried. But I am not very happy. With ffmpeg full load, temperatures reach 95 ºC quite easily, so I am afraid of burning it. I am thinking about improving the cooling, but no decision so far.
eduardo@eduardo-PC:~/Downloads/CoreFreq$ ./corefreq-cli -s -m
Processor [AMD Ryzen Threadripper 3960X 24-Core Processor ]
|- Architecture [Zen2/Castle Peak]
|- Vendor ID [AuthenticAMD]
|- Microcode [ 137367589]
|- Signature [ 8F_31]
|- Stepping [ 0]
|- Online CPU [ 48/ 48]
|- Base Clock [ 99.807]
|- Frequency (MHz) Ratio
Min 399.23 < 4 >
Max 3792.68 < 38 >
|- Factory [100.000]
3800 [ 38 ]
|- Performance
|- OSPM
TGT 2195.76 < 22 >
|- Turbo Boost [ UNLOCK]
XFR 4591.14 [ 46 ]
CPB 4491.33 [ 45 ]
1C 2794.61 < 28 >
2C 2195.76 < 22 >
|- Uncore [ LOCK]
Instruction Set Extensions
|- 3DNow!/Ext [N/N] ADX [Y] AES [Y] AVX/AVX2 [Y/Y]
|- AVX-512 [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/Y] MONITOR/X[Y/Y]
|- MOVBE [Y] MPX [N] PCLMULQDQ [Y] POPCNT [Y]
|- RDRAND [Y] RDSEED [Y] RDTSCP [Y] SEP [Y]
|- SGX [N] SSE [Y] SSE2 [Y] SSE3 [Y]
|- SSSE3 [Y] SSE4.1/4A [Y/Y] SSE4.2 [Y] SYSCALL [Y]
Features
|- 1 GB Pages Support 1GB-PAGES [Capable]
|- 100 MHz multiplier Control 100MHzSteps [Missing]
|- Advanced Configuration & Power Interface ACPI [Capable]
|- Advanced Programmable Interrupt Controller APIC [Capable]
|- Core Multi-Processing CMP Legacy [Capable]
|- 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 [Missing]
|- CPL Qualified Debug Store DS-CPL [Missing]
|- 64-Bit Debug Store DTES64 [Missing]
|- Fast-String Operation Fast-Strings [Missing]
|- 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]
|- Model Specific Registers MSR [Capable]
|- Memory Type Range Registers MTRR [Capable]
|- No-Execute Page Protection NX [Capable]
|- OS-Enabled Ext. State Management OSXSAVE [Capable]
|- Physical Address Extension PAE [Capable]
|- Page Attribute Table PAT [Capable]
|- Pending Break Enable PBE [Missing]
|- Process Context Identifiers PCID [Missing]
|- Perfmon and Debug Capability PDCM [Missing]
|- Page Global Enable PGE [Capable]
|- Page Size Extension PSE [Capable]
|- 36-bit Page Size Extension PSE36 [Capable]
|- Processor Serial Number PSN [Missing]
|- Restricted Transactional Memory RTM [Missing]
|- Safer Mode Extensions SMX [Missing]
|- Self-Snoop SS [Missing]
|- Supervisor-Mode Execution Prevention SMEP [Capable]
|- Time Stamp Counter TSC [Invariant]
|- Time Stamp Counter Deadline TSC-DEADLINE [Missing]
|- Virtual Mode Extension VME [Capable]
|- Virtual Machine Extensions VMX [Missing]
|- Extended xAPIC Support x2APIC [Missing]
|- XSAVE/XSTOR States XSAVE [Capable]
|- xTPR Update Control xTPR [Missing]
Technologies
|- System Management Mode SMM-Lock [ ON]
|- Simultaneous Multithreading SMT [ ON]
|- PowerNow! CnQ [OFF]
|- Core Performance Boost CPB < ON>
|- Virtualization SVM [ ON]
|- I/O MMU AMD-V [OFF]
|- Hypervisor [OFF]
Performance Monitoring
|- Version PM [ 0]
|- Counters: General Fixed
| 6 x 64 bits 3 x 64 bits
|- Enhanced Halt State C1E < ON>
|- Core C6 State CC6 < ON>
|- Package C6 State PC6 < ON>
|- Frequency ID control FID [ ON]
|- Voltage ID control VID [ ON]
|- P-State Hardware Coordination Feedback MPERF/APERF [ ON]
|- Hardware-Controlled Performance States HWP <OFF>
|- Capabilities (MHz) Ratio
Lowest N/A [ 0 ]
Efficient N/A [ 0 ]
Guaranteed N/A [ 0 ]
Highest N/A [ 0 ]
|- Hardware Duty Cycling HDC [OFF]
|- Package C-State
|- Configuration Control CONFIG [ LOCK]
|- Lowest C-State LIMIT [ 0]
|- I/O MWAIT Redirection IOMWAIT [Disable]
|- Max C-State Inclusion RANGE [ 0]
|- MONITOR/MWAIT
|- State index: #0 #1 #2 #3 #4 #5 #6 #7
|- Sub C-State: 1 1 0 0 0 0 0 0
|- Core Cycles [Capable]
|- Instructions Retired [Capable]
|- Reference Cycles [Capable]
|- Last Level Cache References [Missing]
|- Last Level Cache Misses [Missing]
|- Branch Instructions Retired [Missing]
|- Branch Mispredicts Retired [Missing]
Power & Thermal
|- Clock Modulation ODCM [Disable]
|- DutyCycle [ 0.00%]
|- Power Management PWR MGMT [ LOCK]
|- Energy Policy Bias Hint [ 0]
|- Energy Policy HWP EPP [ 0]
|- Junction Temperature TjMax [ 0: 0]
|- Digital Thermal Sensor DTS [Capable]
|- Power Limit Notification PLN [Missing]
|- Package Thermal Management PTM [Missing]
|- Thermal Monitor 1 TTP [Capable]
|- Thermal Monitor 2 HTC [Capable]
|- Thermal Design Power TDP [Missing]
|- Minimum Power Min [Missing]
|- Maximum Power Max [Missing]
|- Units
|- Power watt [ 0.125000000]
|- Energy joule [ 0.000015259]
|- Window second [ 0.000976562]
CPU Pkg Apic Core Thread Caches (w)rite-Back (i)nclusive
# ID ID CCX ID ID L1-Inst Way L1-Data Way L2 Way L3 Way
000:BSP 0 0 0 0 32 8 32 8 512 8 i 65536 9w
001: 0 16 0 8 0 32 8 32 8 512 8 i 65536 9w
002: 0 18 0 9 0 32 8 32 8 512 8 i 65536 9w
003: 0 20 0 10 0 32 8 32 8 512 8 i 65536 9w
004: 0 24 1 12 0 32 8 32 8 512 8 i 65536 9w
005: 0 26 1 13 0 32 8 32 8 512 8 i 65536 9w
006: 0 28 1 14 0 32 8 32 8 512 8 i 65536 9w
007: 0 17 0 8 1 32 8 32 8 512 8 i 65536 9w
008: 0 19 0 9 1 32 8 32 8 512 8 i 65536 9w
009: 0 21 0 10 1 32 8 32 8 512 8 i 65536 9w
010: 0 25 1 12 1 32 8 32 8 512 8 i 65536 9w
011: 0 27 1 13 1 32 8 32 8 512 8 i 65536 9w
012: 0 29 1 14 1 32 8 32 8 512 8 i 65536 9w
013: 0 32 0 16 0 32 8 32 8 512 8 i 65536 9w
014: 0 34 0 17 0 32 8 32 8 512 8 i 65536 9w
015: 0 36 0 18 0 32 8 32 8 512 8 i 65536 9w
016: 0 40 1 20 0 32 8 32 8 512 8 i 65536 9w
017: 0 42 1 21 0 32 8 32 8 512 8 i 65536 9w
018: 0 44 1 22 0 32 8 32 8 512 8 i 65536 9w
019: 0 33 0 16 1 32 8 32 8 512 8 i 65536 9w
020: 0 35 0 17 1 32 8 32 8 512 8 i 65536 9w
021: 0 37 0 18 1 32 8 32 8 512 8 i 65536 9w
022: 0 41 1 20 1 32 8 32 8 512 8 i 65536 9w
023: 0 43 1 21 1 32 8 32 8 512 8 i 65536 9w
024: 0 45 1 22 1 32 8 32 8 512 8 i 65536 9w
025: 0 2 0 1 0 32 8 32 8 512 8 i 65536 9w
026: 0 4 0 2 0 32 8 32 8 512 8 i 65536 9w
027: 0 8 1 4 0 32 8 32 8 512 8 i 65536 9w
028: 0 10 1 5 0 32 8 32 8 512 8 i 65536 9w
029: 0 12 1 6 0 32 8 32 8 512 8 i 65536 9w
030: 0 1 0 0 1 32 8 32 8 512 8 i 65536 9w
031: 0 3 0 1 1 32 8 32 8 512 8 i 65536 9w
032: 0 5 0 2 1 32 8 32 8 512 8 i 65536 9w
033: 0 9 1 4 1 32 8 32 8 512 8 i 65536 9w
034: 0 11 1 5 1 32 8 32 8 512 8 i 65536 9w
035: 0 13 1 6 1 32 8 32 8 512 8 i 65536 9w
036: 0 48 0 24 0 32 8 32 8 512 8 i 65536 9w
037: 0 50 0 25 0 32 8 32 8 512 8 i 65536 9w
038: 0 52 0 26 0 32 8 32 8 512 8 i 65536 9w
039: 0 56 1 28 0 32 8 32 8 512 8 i 65536 9w
040: 0 58 1 29 0 32 8 32 8 512 8 i 65536 9w
041: 0 60 1 30 0 32 8 32 8 512 8 i 65536 9w
042: 0 49 0 24 1 32 8 32 8 512 8 i 65536 9w
043: 0 51 0 25 1 32 8 32 8 512 8 i 65536 9w
044: 0 53 0 26 1 32 8 32 8 512 8 i 65536 9w
045: 0 57 1 28 1 32 8 32 8 512 8 i 65536 9w
046: 0 59 1 29 1 32 8 32 8 512 8 i 65536 9w
047: 0 61 1 30 1 32 8 32 8 512 8 i 65536 9w
Very weird, indeed. Target frequency TGT
appears locked to ratio 22
First time I see TRX40
Can you instead use my integrated stress functions :
Press [O]
for the Tools select:
Atomic Burn
for all Cores
Turbo Select CPU...
Press [F10]
at any time to stop the stress loop
Btw: I will commit pretty soon commit the building fix in the develop
branch
Atomic burning
Turbo select CPU
I wonder why CPU temperatures remain pretty well (below 70C) after these stress tests but are so crazy with ffmpeg...
Build fix released. You can now switch to the develop
branch
git clone -b develop https://github.com/cyring/CoreFreq.git
The last dashboard screenshot is showing Turbo is reaching 4320
Mhz
was Turbo Select CPU...
enough to reach this frequency or did you have to add some load produced by ffmpeg ?
Ok. Thanks for fixing the issue. Yes, Turbo Select CPU was enough to reach the frequency. Actually, I am monitoring it and it reaches up to 4378. Far from the 4500 that AMD sells. Update: I have tried in another CPU core and it is up to 4480
Have you measured the time it takes to build a full Kernel ?
For example, my Xeon W3690 claims 30 minutes to build the Kernel core and modules, all CONFIG_
options set, including also the post operations which lead to an initram fs
I'm seeing on the Web that it lasts less than 5 minutes with a Threadripper ! Can this be true ?
And there is a worst case: building an Android Kernel: 3 hours with a 4C/8T Skylake
As an embedded engineer, those are tasks I'm doing oftenly
With Ubuntu 20.04 config, Kernel compilation 5.4.34 with -j 24 took around 7.30, with -j 48 was around 6.15 (6 minutes, 15 seconds)
So yes, it is true. My threadripper does not have the best cooling and also, pbo is not activated (which could provide much better results).
My background is scientific (the computer will serve for that purpose), and I am just an enthusiastic and user (but no idea about programming as compared to people like you)
I want a Threadripper, in a Small Form Factor, but cooling is also a matter of worrying...
In the UI, you can offline CPUs and thus maximize the best Core(s)
Target [TGT] , Turbo, Maximum frequency are still a work in progress but it's working better and better. So far, tested with a 3600X in issue #172 Feel to try.
I want a Threadripper, in a Small Form Factor, but cooling is also a matter of worrying...
In the UI, you can offline CPUs and thus maximize the best Core(s)
Target [TGT] , Turbo, Maximum frequency are still a work in progress but it's working better and better. So far, tested with a 3600X in issue #172 Feel to try.
Bug: I'm just noticing that you have so much RAM that total is not displayed in the Dashboard card.
I want a Threadripper, in a Small Form Factor, but cooling is also a matter of worrying...
In the UI, you can offline CPUs and thus maximize the best Core(s)
Target [TGT] , Turbo, Maximum frequency are still a work in progress but it's working better and better. So far, tested with a 3600X in issue #172 Feel to try.
Thanks for the advice. I didn't know it was possible to offline some CPUs. I will try
I want a Threadripper, in a Small Form Factor, but cooling is also a matter of worrying... In the UI, you can offline CPUs and thus maximize the best Core(s) Target [TGT] , Turbo, Maximum frequency are still a work in progress but it's working better and better. So far, tested with a 3600X in issue #172 Feel to try.
Thanks for the advice. I didn't know it was possible to offline some CPUs. I will try
This a Kernel Offline, not a Hardware Offline. It means the Kernel will stop scheduling tasks to the selected CPU and put it in idle mode. However the Core behind the CPU is not gate off, but its usage should less
Ok. I've been using it. I see the CPU is deactivated in corefreq app but, does it affect to other (already running o new) tasks? I have seen in htop that it does not have an effect.
Ok. I've been using it. I see the CPU is deactivated in corefreq app but, does it affect to other (already running o new) tasks? I have seen in htop that it does not have an effect.
The other applications tasks have to be migrated by the Kernel scheduler to the remaining online CPUs ; even If CPU bound, and depending of the application CPU affinity bitmap :
On its side, the CoreFreq framework is monitoring the CPU state changes and will end or begin its various services, CPU bound timers and threads, consequently.
Ok. thanks for letting me know. One question that I have with this processor is about the multithreading. In the programs I am normally running, I manually select the number of threats I want. Since the processor is 24 (true) cores and 48 threads, I always have the doubt about selecting 24 or 48, thinking of whether it will perform faster or not. I guess it depends on the specific application but as a general rule, it is not clear to me.
Ok. thanks for letting me know. One question that I have with this processor is about the multithreading. In the programs I am normally running, I manually select the number of threats I want. Since the processor is 24 (true) cores and 48 threads, I always have the doubt about selecting 24 or 48, thinking of whether it will perform faster or not. I guess it depends on the specific application but as a general rule, it is not clear to me.
My way would be to write small micro benchmark programs:
AMD is publishing a document about getting the most from the Zen architecture. See links in my Wiki > AMD Tech Docs
I have tried your latest git version (fresh pull) and I cannot make it run. I have removed the module with rmmod and loaded the new one. The problem I am facing is this:
eduardo@eduardo-PC:~/Downloads/CoreFreq$ ./corefreq-cli
Daemon connection error code 1
Version 1.76.1: 'Operation not permitted' @ line 11989
The daemon seems to be running fine
I have tried your latest git version (fresh pull) and I cannot make it run. I have removed the module with rmmod and loaded the new one. The problem I am facing is this:
eduardo@eduardo-PC:~/Downloads/CoreFreq$ ./corefreq-cli Daemon connection error code 1 Version 1.76.1: 'Operation not permitted' @ line 11989
The daemon seems to be running fine
I'm printing this error when API versions are wrongly mixed
Please make sure to build & run from only one project directory.
rmmod -f
necessary when cpufreq or cpuidle registered/home/Shane/Documents/CoreFreq/corefreqk.c:10543:9: error: implicit declaration of function ‘cpu_down’ [-Werror=implicit-function-declaration]
10543 | rc = cpu_down(cpu);
| ^~~~
/home/Shane/Documents/CoreFreq/corefreqk.c:10560:9: error: implicit declaration of function ‘cpu_up’ [-Werror=implicit-function-declaration]
10560 | rc = cpu_up(cpu);
| ^~
cc1: some warnings being treated as errors
make[2]: [scripts/Makefile.build:267: /home/Shane/Documents/CoreFreq/corefreqk.o] Error 1
make[1]: [Makefile:1732: /home/Shane/Documents/CoreFreq] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.7.0-0.rc3.20200429git1d2cc5ac6f66.1.fc32.x86_64'
make: *** [Makefile:39: all] Error 2
I'm assuming my problem is from using such a new kernel. Anything I can do to fix this?
It is fixed in the develop branch
I have the same failure to compile latest git version as of today for the newly released openSUSE Leap 15.2, using kernel 5.3.18 with lot of stuff backported (it compiles fine on Leap 15.1 using an older kernel and Tumbleweed using 5.7.7):
[ 4s] cc -Wall \
[ 4s] corefreq-cli.c corefreq-ui.c corefreq-cli-rsc.c \
[ 4s] corefreq-cli-json.c corefreq-cli-extra.c \
[ 4s] -D FEAT_DBG=0 -D UBENCH=0 -D TASK_ORDER=5 -D MAX_FREQ_HZ=5250000000 \
[ 4s] -o corefreq-cli -lm -lrt
[ 4s] /usr/bin/make -j1 -C /lib/modules/5.3.18-lp152.19-default/build M=/home/abuild/rpmbuild/BUILD/CoreFreq modules
[ 4s] make[1]: Entering directory '/usr/src/linux-5.3.18-lp152.19-obj/x86_64/default'
[ 4s] make[1]: warning: -jN forced in submake: disabling jobserver mode.
[ 4s] make[1]: Leaving directory '/usr/src/linux-5.3.18-lp152.19-obj/x86_64/default'
[ 4s] make[1]: Entering directory '/usr/src/linux-5.3.18-lp152.19-obj/x86_64/default'
[ 5s] CC [M] /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.o
[ 5s] /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.c:258:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
[ 5s] /*MANDATORY*/ .verify = CoreFreqK_Policy_Verify,
[ 5s] ^~~~~~~~~~~~~~~~~~~~~~~
[ 5s] /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.c:258:26: note: (near initialization for 'CoreFreqK.FreqDriver.verify')
[ 5s] /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.c: In function 'CoreFreqK_Policy_Verify':
[ 5s] /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.c:10941:36: error: passing argument 1 of 'cpufreq_verify_within_cpu_limits' from incompatible pointer type [-Werror=incompatible-pointer-types]
[ 5s] cpufreq_verify_within_cpu_limits(policy);
[ 5s] ^~~~~~
[ 5s] In file included from /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.c:25:0:
[ 5s] /usr/src/linux-5.3.18-lp152.19/include/linux/cpufreq.h:448:1: note: expected 'struct cpufreq_policy_data *' but argument is of type 'struct cpufreq_policy *'
[ 5s] cpufreq_verify_within_cpu_limits(struct cpufreq_policy_data *policy)
[ 5s] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 7s] cc1: some warnings being treated as errors
[ 7s] make[3]: *** [/usr/src/linux-5.3.18-lp152.19/scripts/Makefile.build:282: /home/abuild/rpmbuild/BUILD/CoreFreq/corefreqk.o] Error 1
[ 7s] make[2]: *** [/usr/src/linux-5.3.18-lp152.19/Makefile:1644: _module_/home/abuild/rpmbuild/BUILD/CoreFreq] Error 2
[ 7s] make[1]: *** [../../../linux-5.3.18-lp152.19/Makefile:179: sub-make] Error 2
[ 7s] make[1]: Leaving directory '/usr/src/linux-5.3.18-lp152.19-obj/x86_64/default'
[ 7s] make: *** [Makefile:43: all] Error 2
[ 7s] error: Bad exit status from /var/tmp/rpm-tmp.uP42uY (%build)
https://github.com/cyring/CoreFreq/blob/befddf58b4f25e8b8955274dc89815e863fdbf0c/corefreqk.c#L10932 https://github.com/cyring/CoreFreq/blob/befddf58b4f25e8b8955274dc89815e863fdbf0c/corefreqk.h#L3807
Above are the statements where you will adapt the version to fit your Suse distribution.
The thing is that looking at the 5.3.18 mainstream kernel, the Suse expected structure cpufreq_policy_data
is not defined, but it's still referencing cpufreq_policy_data
https://elixir.bootlin.com/linux/v5.3.18/source/include/linux/cpufreq.h#L80
I don't see a way to manage compiling directives per distribution (and their back-port stuffs); I have to stick to the Linux kernel code versions to address a maximum cases of builds. Why Suse don't keep the kernel code coherency ?
Please let me know if it helps
EDIT:
If you find a standard build directive to check for openSUSE Leap 15.2
, I will put it in next CoreFreq release.
But I doubt one exists.
I will look if I can find such directive (also doubt it exists). Otherwise, as I'm building via a RPM, I will simply add a custom patch for the Leap 15.2 case.
I will look if I can find such directive (also doubt it exists). Otherwise, as I'm building via a RPM, I will simply add a custom patch for the Leap 15.2 case.
Off course, what you could also do is to build your kernel without CONFIG_CPU_FREQ
, CoreFreq driver will thus manage to build without.
I just added a conditional patch in the RPM for Leap 15.2. For reference, it is maintained there: https://build.opensuse.org/package/show/hardware/CoreFreq
Interestingly, there are some Suse specific defines in the kernel (suse_version.h) but I did not understand how (if?) they could be used for module building.
I just added a conditional patch in the RPM for Leap 15.2. For reference, it is maintained there: https://build.opensuse.org/package/show/hardware/CoreFreq
Interestingly, there are some Suse specific defines in the kernel (suse_version.h) but I did not understand how (if?) they could be used for module building.
So the patch is dedicated to this Suse release, isn't it ?
This spec also shows a requirement:
# replace invocation in corefreqd.service of /bin/corefreqd by /usr/bin/corefreqd
sed -i -e 's/\/bin\/corefreqd/\/usr\/bin\/corefreqd/g' %{buildroot}%{_unitdir}/corefreqd.service
Is there something I can improve for ?
Maybe corefreqd.service shoud point to /usr/bin/corefreqd since it is the default PREFIX used in Makefile and where it will be installed ?
EDIT: yes the patch is specific to this openSUSE release (15.2) although it could be used for any other distro that has backported that cpufreq_policy_data change to older kernels.
Maybe corefreqd.service shoud point to /usr/bin/corefreqd since it is the default PREFIX used in Makefile and where it will be installed ?
It's an error, please open an issue, I will fix it.
Thank you
Change done
Hello, I have recently upgraded my system to ubuntu 20.04 and I am not able to compile the code. My computer has an AMD Threadripper 3960X. I am using the last github version. Any clue about the error? Thanks.