I have run a quick `7z b` benchmark on the lowlatency kernel with and
without `nohz_full` parameter, and the results are fairly close:

No `nohz_full` parameter:

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      82694  1333   6033  80445  |     741767  1584   3994  63265
23:      81022  1400   5896  82552  |     736593  1589   4011  63731
24:      79427  1429   5978  85401  |     722675  1581   4011  63433
25:      77665  1459   6077  88676  |     711778  1587   3990  63346
----------------------------------  | ------------------------------
Avr:            1405   5996  84269  |             1585   4002  63444
Tot:            1495   4999  73856

With `nohz_full=1-15` parameter:

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      84475  1357   6055  82177  |     738578  1552   4060  62993
23:      80361  1376   5951  81878  |     726439  1482   4240  62852
24:      80275  1437   6006  86312  |     715778  1496   4199  62827
25:      77007  1448   6073  87924  |     708632  1563   4034  63066
----------------------------------  | ------------------------------
Avr:            1404   6021  84573  |             1523   4133  62935
Tot:            1464   5077  73754

In the latter case, decompressing is slightly slower, but definitely not
"800MHz" slower, so it looks like the problem is indeed with frequency
reporting rather than scaling.


** Summary changed:

- Specifying nohz_full disables CPU frequency scaling
+ Specifying nohz_full breaks CPU frequency reporting

** Description changed:

  With the lowlatency kernel, if I specify "nohz_full=1-15" boot parameter
- then CPU frequency scaling doesn't work for the logical cores 1-15. That
- is, only logical core 0 shows varying CPU frequency in its
+ then CPU frequency reporting doesn't work for the logical cores 1-15.
+ That is, only logical core 0 shows varying CPU frequency in its
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq file, all other
  cores constantly show 800000 in their scaling_cur_freq files (which is
  the lowest supported frequency) regardless of the CPU load.
  
  Steps to reproduce:
  
  1. Add "nohz_full=1-15" (specify the core numbers to include all logical 
cores except 0) to kernel boot options in /etc/default/grub.
  2. Run `sudo update-grub` and reboot.
  3. Upon booting, run a multithreaded workload. For example, run `openssl 
speed -multi $(nproc --all)`.
  4. In another console, monitor CPU frequencies by running `watch cat 
/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq`.
  
  Actual results:
  
- All cores specified in "nohz_full" parameter are always at their lowest
+ All cores specified in "nohz_full" parameter always report their lowest
  frequency.
+ 
+ Despite that, the actual performance seems to be as if frequency scaling
+ actually works (i.e. according to benchmarks, the performance seems to
+ be similar with and without the "nohz_full" parameter).
  
  Expected results:
  
- All cores must scale the frequency up with active load.
+ All cores must report their actual frequency depending on the load.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: linux-image-6.5.0-15-lowlatency 6.5.0-15.15.1.1~22.04.1
  ProcVersionSignature: Ubuntu 6.5.0-15.15.1.1~22.04.1-lowlatency 6.5.3
  Uname: Linux 6.5.0-15-lowlatency x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.11-0ubuntu82.5
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: KDE
  Date: Tue Jan 30 23:39:51 2024
  InstallationDate: Installed on 2015-05-01 (3196 days ago)
  InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
  SourcePackage: linux-signed-lowlatency-hwe-6.5
  UpgradeStatus: Upgraded to jammy on 2022-05-14 (626 days ago)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-signed-lowlatency-hwe-6.5 in
Ubuntu.
https://bugs.launchpad.net/bugs/2051733

Title:
  Specifying nohz_full breaks CPU frequency reporting

Status in linux-signed-lowlatency-hwe-6.5 package in Ubuntu:
  Confirmed

Bug description:
  With the lowlatency kernel, if I specify "nohz_full=1-15" boot
  parameter then CPU frequency reporting doesn't work for the logical
  cores 1-15. That is, only logical core 0 shows varying CPU frequency
  in its /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq file, all
  other cores constantly show 800000 in their scaling_cur_freq files
  (which is the lowest supported frequency) regardless of the CPU load.

  Steps to reproduce:

  1. Add "nohz_full=1-15" (specify the core numbers to include all logical 
cores except 0) to kernel boot options in /etc/default/grub.
  2. Run `sudo update-grub` and reboot.
  3. Upon booting, run a multithreaded workload. For example, run `openssl 
speed -multi $(nproc --all)`.
  4. In another console, monitor CPU frequencies by running `watch cat 
/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq`.

  Actual results:

  All cores specified in "nohz_full" parameter always report their
  lowest frequency.

  Despite that, the actual performance seems to be as if frequency
  scaling actually works (i.e. according to benchmarks, the performance
  seems to be similar with and without the "nohz_full" parameter).

  Expected results:

  All cores must report their actual frequency depending on the load.

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: linux-image-6.5.0-15-lowlatency 6.5.0-15.15.1.1~22.04.1
  ProcVersionSignature: Ubuntu 6.5.0-15.15.1.1~22.04.1-lowlatency 6.5.3
  Uname: Linux 6.5.0-15-lowlatency x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.11-0ubuntu82.5
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: KDE
  Date: Tue Jan 30 23:39:51 2024
  InstallationDate: Installed on 2015-05-01 (3196 days ago)
  InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
  SourcePackage: linux-signed-lowlatency-hwe-6.5
  UpgradeStatus: Upgraded to jammy on 2022-05-14 (626 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-signed-lowlatency-hwe-6.5/+bug/2051733/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to