Closed JohnAZoidberg closed 5 years ago
Thanks for your issues and PR I will take time this WE to process them. Come back to you ASAP
Is there any other information I can provide you with?
Yes:
I appreciate a lot your help. Thank you.
stress --cpu 1
.
How do I use the internal stress tester?Register_CPU_Idle=1
? But for that I also need to blacklist Intel's idle driver?
I did that:
$ modprobe -c | grep corefreq
options corefreqk Register_CPU_Idle=1
$ journalctl -k | grep intel_cstate
Jun 07 23:57:18 think-nix kernel: Kernel command line: initrd=\efi\nixos\initrd.efi loglevel=4 nmi_watchdog=0 modprobe.blacklist=intel_cstate idle=halt intel_idle.max_cstate=0 mitigations=off transparent_hugepage=never
But corefreq-cli
still only show up until C7
Is that what you meant?
Ohhh, I just noticed - it doesn't show another C-state but the dashboard doesn't crash! Edit: Actually it does, but it ran much much longer the first time. Now it behaves the same as before. Just a few seconds of running.
I'm running Linux 5.1.5.
I have to use -DCONFIG_CPU_IDLE
to build the idle driver into the kernel module, right?
Now it shows:
$ cat /sys/devices/system/cpu/cpuidle/current_driver
corefreqk-idle
but corefreq-cli
is still the same.
Thanks for your returns.
corefreqk-idle
: the sub-driver has been well registered. Press [k] (kernel data) or [s] (settings) to see confirmation.
C7 is so far the deepest Core C-States implemented in the monitoring view. However, press [g] to monitor the Package C-States down to C10
You can also try to register the CPU frequency sub-driver. It probably needs to blacklist the other ACPI, pcc, p-state drivers to let CoreFreq takes the room. When registered, you have the full control to set the min, max, target HWP frequencies, press [p] ; but also the energy policy in the Power window.
Remark: when changing HWP policies, frequencies, watch the resulting Vcore and your Turbo highest performance frequency ratio. You may find for example the optimum processor settings for H24 use.
About the integrated stressing function : just press [F3] and choose among the algorithms. A red dot appears beside the LCD when a stressing function is processing. Press [F10] to stop stressing at any time
The UI has been designed for a black background, but I had centralized the theme resources in header files to let users customize them.
If you are in need of a full "color" theme, I can refactor the code to instantiate a new set and provide a chooser option ?
Now with the idle driver, sometimes it crashes on the regular command and won't start working again until a reboot:
$ gdb ./corefreq-cli
Reading symbols from ./corefreq-cli...done.
(gdb) run
Starting program: /home/zoid/media/clone/reference/CoreFreq/corefreq-cli
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libthread_db.so.1".
*** buffer overflow detected ***: /home/zoid/media/clone/reference/CoreFreq/corefreq-cli terminated
Program received signal SIGABRT, Aborted.
0x00007ffff7cafbe0 in raise () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
(gdb) where
#0 0x00007ffff7cafbe0 in raise () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#1 0x00007ffff7cb0dc1 in abort () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#2 0x00007ffff7cf12ac in __libc_message () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#3 0x00007ffff7d7df68 in __fortify_fail_abort () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#4 0x00007ffff7d7df81 in __fortify_fail () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#5 0x00007ffff7d7c070 in __chk_fail () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#6 0x00007ffff7d7b5d9 in _IO_str_chk_overflow () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#7 0x00007ffff7cf51cb in _IO_default_xsputn () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#8 0x00007ffff7cc7d01 in vfprintf () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#9 0x00007ffff7d7b66c in __vsprintf_chk () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#10 0x00007ffff7d7b5bd in __sprintf_chk () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#11 0x000000000042476b in Layout_Ruller_Load ()
#12 0x0000000000425589 in Layout_Header_DualView_Footer ()
#13 0x00000000004269a5 in Top ()
#14 0x0000000000402a4f in main ()
(gdb)
It also crashes when I show the kernel config and then the settings, i.e. press [k] and then [s].
Running in a plain XTerm with fish (installed from this package): no crash in different load cases.
$ ./corefreq-cli -d
and
$ make clean all CC='cc -g' ; gdb corefreq-cli
run
Despite you have disable the NMI from the Kernel command line, CoreFreq may interact with other softwares which make use of the fixed counter registers: here's the list.
When buffer overflows occur in the Client, it is a strong sign that the PMU counters are rewritten, to the detriment of the corefreqk.ko
readings.
I suggest to start the driver with no option until we solve the issue.
Here is the Kernel config I'm running CoreFreq oftenly with.
My current setup: ArchLinux Kernel 5.1.7 GNU Compiler (gcc) 8.3.0 , (gcc-libs) 8.3.0-1 GNU assembler (as) 2.32 GNU linker (ld) 2.32 GNU Make 4.2.1 GNU C Library (glibc) 2.29-1 , POSIX threads GNU Debugger (gdb) 8.3-1 valgrind 3.14.0-1 binutils 2.32-1 xterm 346-1
$ gcc -E -v
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 8.3.0 (GCC)
$ grep FLAG /etc/makepkg.conf
CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-march=westmere -mtune=westmere -O2 -pipe -fno-plt" CXXFLAGS="-march=westmere -mtune=westmere -O2 -pipe -fno-plt" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" MAKEFLAGS="-j16" DEBUG_CFLAGS="-g -fvar-tracking-assignments" DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
Latest commit may fix the Idle States enumeration on your Processor architecture:
insmod corefreqk.ko Register_CPU_Idle=1
Closing the issue if latest version is stable ?
When I run
corefreq-cli -d
it sometimes crashes before showing anything and sometimes it gets to show the output for a second and then crashes. All other options seem to be running fine - here's my system output.Fish is the name of my shell.
Yes, I booted with
nmi_watchdog=0
on the kernel commandline. I built from the latest master 1b2d21ffbd52703cca6f0e814a01bc69edae6de2.