# git rev-parse -q --verify 0a4ec6aa035a52c422eceb2ed51ed88392a3d6c2^{commit} 0a4ec6aa035a52c422eceb2ed51ed88392a3d6c2 already have revision, skipping fetch # git checkout -q -f -B kisskb 0a4ec6aa035a52c422eceb2ed51ed88392a3d6c2 # git clean -qxdf # < git log -1 # commit 0a4ec6aa035a52c422eceb2ed51ed88392a3d6c2 # Author: Gautham R. Shenoy # Date: Thu May 31 17:45:09 2018 +0530 # # cpuidle: powernv: Fix promotion from snooze if next state disabled # # The commit 78eaa10f027c ("cpuidle: powernv/pseries: Auto-promotion of # snooze to deeper idle state") introduced a timeout for the snooze idle # state so that it could be eventually be promoted to a deeper idle # state. The snooze timeout value is static and set to the target # residency of the next idle state, which would train the cpuidle # governor to pick the next idle state eventually. # # The unfortunate side-effect of this is that if the next idle state(s) # is disabled, the CPU will forever remain in snooze, despite the fact # that the system is completely idle, and other deeper idle states are # available. # # This patch fixes the issue by dynamically setting the snooze timeout # to the target residency of the next enabled state on the device. # # Before Patch: # POWER8 : Only nap disabled. # $ cpupower monitor sleep 30 # sleep took 30.01297 seconds and exited with status 0 # |Idle_Stats # PKG |CORE|CPU | snoo | Nap | Fast # 0| 8| 0| 96.41| 0.00| 0.00 # 0| 8| 1| 96.43| 0.00| 0.00 # 0| 8| 2| 96.47| 0.00| 0.00 # 0| 8| 3| 96.35| 0.00| 0.00 # 0| 8| 4| 96.37| 0.00| 0.00 # 0| 8| 5| 96.37| 0.00| 0.00 # 0| 8| 6| 96.47| 0.00| 0.00 # 0| 8| 7| 96.47| 0.00| 0.00 # # POWER9: Shallow states (stop0lite, stop1lite, stop2lite, stop0, stop1, # stop2) disabled: # $ cpupower monitor sleep 30 # sleep took 30.05033 seconds and exited with status 0 # |Idle_Stats # PKG |CORE|CPU | snoo | stop | stop | stop | stop | stop | stop | stop | stop # 0| 16| 0| 89.79| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00 # 0| 16| 1| 90.12| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00 # 0| 16| 2| 90.21| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00 # 0| 16| 3| 90.29| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00 # # After Patch: # POWER8 : Only nap disabled. # $ cpupower monitor sleep 30 # sleep took 30.01200 seconds and exited with status 0 # |Idle_Stats # PKG |CORE|CPU | snoo | Nap | Fast # 0| 8| 0| 16.58| 0.00| 77.21 # 0| 8| 1| 18.42| 0.00| 75.38 # 0| 8| 2| 4.70| 0.00| 94.09 # 0| 8| 3| 17.06| 0.00| 81.73 # 0| 8| 4| 3.06| 0.00| 95.73 # 0| 8| 5| 7.00| 0.00| 96.80 # 0| 8| 6| 1.00| 0.00| 98.79 # 0| 8| 7| 5.62| 0.00| 94.17 # # POWER9: Shallow states (stop0lite, stop1lite, stop2lite, stop0, stop1, # stop2) disabled: # # $ cpupower monitor sleep 30 # sleep took 30.02110 seconds and exited with status 0 # |Idle_Stats # PKG |CORE|CPU | snoo | stop | stop | stop | stop | stop | stop | stop | stop # 0| 0| 0| 0.69| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 9.39| 89.70 # 0| 0| 1| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.05| 93.21 # 0| 0| 2| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 89.93 # 0| 0| 3| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 0.00| 93.26 # # Fixes: 78eaa10f027c ("cpuidle: powernv/pseries: Auto-promotion of snooze to deeper idle state") # Cc: stable@vger.kernel.org # v4.2+ # Signed-off-by: Gautham R. Shenoy # Reviewed-by: Balbir Singh # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < git log --format=%s --max-count=1 0a4ec6aa035a52c422eceb2ed51ed88392a3d6c2 # < make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc6xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ppc6xx_defconfig # make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc6xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1268:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2497:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1819:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/ppc/awacs.c: In function 'snd_pmac_awacs_init': /kisskb/src/include/sound/control.h:223:2: warning: 'speaker_vol' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/ppc/awacs.c:886:36: note: 'speaker_vol' was declared here /kisskb/src/drivers/dma-buf/reservation.c: In function 'reservation_object_add_shared_fence': /kisskb/src/drivers/dma-buf/reservation.c:225:6: warning: 'k' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:340:21: note: 'pdeo' was declared here /kisskb/src/fs/nfsd/nfs4xdr.c: In function 'nfsd4_encode_components_esc': /kisskb/src/fs/nfsd/nfs4xdr.c:2041:9: warning: 'str' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/bridge/br_netlink.c: In function 'br_afspec': /kisskb/src/net/bridge/br_netlink.c:635:7: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1822:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1732:46: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:251:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:231:19: note: 'i' was declared here /kisskb/src/net/mac80211/mlme.c: In function 'ieee80211_rx_mgmt_beacon': /kisskb/src/net/mac80211/mlme.c:1352:3: warning: 'pwr_level_cisco' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c:1309:6: note: 'pwr_level_cisco' was declared here arch/powerpc/boot/pq2fads.dtb: Warning (pci_bridge): /pci@f0010800: missing bus-range for PCI bridge arch/powerpc/boot/pq2fads.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/mpc8272ads.dtb: Warning (pci_bridge): /pci@f0010800: missing bus-range for PCI bridge arch/powerpc/boot/mpc8272ads.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/mpc832x_rdb.dtb: Warning (interrupts_property): /qe@e0100000/mdio@3120/ethernet-phy@0:#interrupt-cells: size is (4), expected multiple of 8 arch/powerpc/boot/mpc832x_rdb.dtb: Warning (interrupts_property): /qe@e0100000/mdio@3120/ethernet-phy@4:#interrupt-cells: size is (4), expected multiple of 8 INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:45 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872459 Bytes = 4758.26 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b00230 INFO: Uncompressed kernel (size 0xa41528) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:45 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872525 Bytes = 4758.33 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b00230 Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:45 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872036 Bytes = 4757.85 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b007a0 Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:45 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872336 Bytes = 4758.14 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b00230 INFO: Uncompressed kernel (size 0xa30e04) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa30e04) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:45 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872325 Bytes = 4758.13 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b007a0 Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872790 Bytes = 4758.58 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b00230 Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872191 Bytes = 4758.00 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b00230 Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4872174 Bytes = 4757.98 kB = 4.65 MB Load Address: 00b00000 Entry Point: 00b00230 Image Name: Linux-4.17.0-rc3+ Created: Wed Jun 6 00:35:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4849014 Bytes = 4735.37 kB = 4.62 MB Load Address: 00000000 Entry Point: 00000000 Completed OK # rm -rf /kisskb/build/powerpc-next_ppc6xx_defconfig_powerpc # Build took: 0:03:06.323551