Bug#804857: linux: New feature: enable CONFIG_NO_HZ_FULL and CONFIG_RCU_NOCB_CPU/CONFIG_RCU_NOCB_CPU_NONE

2015-11-12 Thread Quentin Deldycke
Source: linux
Severity: wishlist

Dear Maintainer,

Could you please enable kernel options CONFIG_NO_HZ_FULL, CONFIG_RCU_NOCB_CPU 
and CONFIG_RCU_NOCB_CPU_NONE.

As explained in: https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt

This options:
 - Don't modify default kernel behavior
 - Enable kernel command line nohz_full to enable tickless cpus
 - Enable kernel command line rcu_nocbs to offload rcu callbacks

The combination of these parameters + cpu-pinning of virtual machines greatly 
improve performance.
It also reduces latency in these virtual machines as the host system doesn't 
try to use it. (if your cgroup is correctly made)

These parameters are disabled in all debian kernels.
These parameters are enabled for various linux distribution by default without 
problem. (rhel 7 being one of them)
  (note that rhel 7 uses CONFIG_RCU_NOCB_CPU_ALL and user can pin offload 
kthreads to a core)

The usage of CONFIG_RCU_NOCB_CPU_NONE doesn't offload by default. But possibly 
this behavior is not the best.


Quentin.

-- System Information:
Debian Release: stretch/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-rc7-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



Bug#778219: base: haswell processors doesn't go under pc3 sleep state

2015-02-12 Thread Quentin Deldycke
Package: base
Severity: important

Hi,

Using these machines:

- DELL Optiplex 790 (i5 2500)
- DELL Optiplex 9020 (i7 4770)
- PC1 (i7 4790k + Asrock Z97 Extreme 6)
- PC2 (i5 2500k + Gigabyte H67N-USB3-B3)
- ACER Aspire V7-582pg (i5 4200U)

Additionnal informations:
- All PC use igp for display
- PC1 have a R9 290, but it is used in combination with vfio + kvm. Not used by 
linux.
- Acer aspire is an optimus laptop with GT 750M
- DELL pcs use kernel 3.16
- other ones uses kernel 3.18

Bug:
- According to turbostat, all haswell processors can't reach sleep state 
deeper than pc3. ex with acer laptop turbostat:

turbostat v3.7 Feb 6, 2014 - Len Brown l...@kernel.org
CPUID(0): GenuineIntel 13 CPUID levels; family:model:stepping 0x6:45:1 (6:69:1)
CPUID(6): APERF, DTS, PTM, EPB
RAPL: 17476 sec. Joule Counter Range, at 15 Watts
cpu0: MSR_NHM_PLATFORM_INFO: 0x8083df3011700
8 * 100 = 800 MHz max efficiency
23 * 100 = 2300 MHz TSC frequency
cpu0: MSR_IA32_POWER_CTL: 0x0004005d (C1E auto-promotion: DISabled)
cpu0: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008405 (UNdemote-C3, UNdemote-C1, 
demote-C3, demote-C1, locked: pkg-cstate-limit=5: pc7s)
cpu0: MSR_NHM_TURBO_RATIO_LIMIT: 0x1717171a
23 * 100 = 2300 MHz max turbo 4 active cores
23 * 100 = 2300 MHz max turbo 3 active cores
23 * 100 = 2300 MHz max turbo 2 active cores
26 * 100 = 2600 MHz max turbo 1 active cores
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x0006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.61 Joules, 
0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x0078 (15 W TDP, RAPL 0 - 0 W, 0.00 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x804280c800dd80c8 (locked)
cpu0: PKG Limit #1: ENabled (25.00 Watts, 28.00 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (25.00 Watts, 0.002441* sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x (UNlocked)
cpu0: Cores Limit: DISabled (0.00 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x (UNlocked)
cpu0: GFX Limit: DISabled (0.00 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x0564 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88330800 (49 C)
cpu0: MSR_IA32_THERM_STATUS: 0x88360800 (46 C +/- 1)
cpu2: MSR_IA32_THERM_STATUS: 0x88360800 (46 C +/- 1)
Core CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz SMI  CPU%c1  CPU%c3  
CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 
Pk%pc10 PkgWatt CorWatt GFXWatt
   -   -  714.3216552292   08.032.81
0.56   84.28  45  48   24.73   54.830.000.000.000.00
0.003.120.390.00
   0   0  684.1516342292   06.912.64
0.45   85.84  45  48   24.73   54.830.000.000.000.00
0.003.120.390.00
   0   1  673.6818312292   07.38
   1   2  754.7915652292   08.842.99
0.67   82.71  45
   1   3  754.6416272292   08.99


- While all Sandy Bridge can reach deeper states. Example with the 2500k 
processor.

turbostat v3.7 Feb 6, 2014 - Len Brown l...@kernel.org
CPUID(0): GenuineIntel 13 CPUID levels; family:model:stepping 0x6:2a:7 (6:42:7)
CPUID(6): APERF, DTS, PTM, EPB
RAPL: 690 sec. Joule Counter Range, at 95 Watts
cpu0: MSR_NHM_PLATFORM_INFO: 0x100060012100
16 * 100 = 1600 MHz max efficiency
33 * 100 = 3300 MHz TSC frequency
cpu0: MSR_IA32_POWER_CTL: 0x0004005d (C1E auto-promotion: DISabled)
cpu0: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e000403 (UNdemote-C3, UNdemote-C1, 
demote-C3, demote-C1, UNlocked: pkg-cstate-limit=3: pc6)
cpu0: MSR_NHM_TURBO_RATIO_LIMIT: 0x22232425
34 * 100 = 3400 MHz max turbo 4 active cores
35 * 100 = 3500 MHz max turbo 3 active cores
36 * 100 = 3600 MHz max turbo 2 active cores
37 * 100 = 3700 MHz max turbo 1 active cores
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x0006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a1003 (0.125000 Watts, 0.15 Joules, 
0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0xa03c001e002f8 (95 W TDP, RAPL 60 - 120 W, 0.009766 
sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0xa580001483c0 (UNlocked)
cpu0: PKG Limit #1: ENabled (120.00 Watts, 1.00 sec, clamp DISabled)
cpu0: PKG Limit #2: ENabled (1200.00 Watts, 0.000977* sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 15
cpu0: MSR_PP0_POWER_LIMIT: 0x001483c0 (UNlocked)
cpu0: Cores Limit: ENabled (120.00 Watts, 1.00 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x001483c0 (UNlocked)
cpu0: GFX Limit: ENabled (120.00 Watts, 1.00 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00621200 (98 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x883a (40 C)
cpu0: MSR_IA32_THERM_STATUS: 0x883b (39 C +/- 1)
cpu1: MSR_IA32_THERM_STATUS: 0x883a (40 C +/- 1)
cpu2: MSR_IA32_THERM_STATUS: 0x883a (40 C +/- 1)
cpu3: MSR_IA32_THERM_STATUS: 0x883b (39 C