linux/drivers
Rafael J. Wysocki 27ab8f1648 cpuidle: menu: Fix wakeup statistics updates for polling state
[ Upstream commit 5f26bdceb9 ]

If the CPU exits the "polling" state due to the time limit in the
loop in poll_idle(), this is not a real wakeup and it just means
that the "polling" state selection was not adequate.  The governor
mispredicted short idle duration, but had a more suitable state been
selected, the CPU might have spent more time in it.  In fact, there
is no reason to expect that there would have been a wakeup event
earlier than the next timer in that case.

Handling such cases as regular wakeups in menu_update() may cause the
menu governor to make suboptimal decisions going forward, but ignoring
them altogether would not be correct either, because every time
menu_select() is invoked, it makes a separate new attempt to predict
the idle duration taking distinct time to the closest timer event as
input and the outcomes of all those attempts should be recorded.

For this reason, make menu_update() always assume that if the
"polling" state was exited due to the time limit, the next proper
wakeup event for the CPU would be the next timer event (not
including the tick).

Fixes: a37b969a61 "cpuidle: poll_state: Add time limit to poll_idle()"
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-24 08:20:07 +01:00
..
accessibility
acpi ACPICA: Never run _REG on system_memory and system_IO 2019-11-24 08:20:07 +01:00
amba
android android: binder: no outgoing transaction when thread todo has transaction 2019-11-20 18:46:42 +01:00
ata ata: ahci_brcm: Allow using driver or DSL SoCs 2019-11-24 08:19:33 +01:00
atm Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 2019-09-21 07:16:57 +02:00
auxdisplay auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach 2019-09-06 10:21:56 +02:00
base component: fix loop condition to call unbind() if bind() fails 2019-11-20 18:46:47 +01:00
bcma
block nbd: handle racing with error'ed out commands 2019-11-10 11:27:35 +01:00
bluetooth Bluetooth: btrsi: fix bt tx timeout issue 2019-11-20 18:47:42 +01:00
bus bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() 2019-09-21 07:16:51 +02:00
cdrom
char crypto: chacha20 - Fix chacha20_block() keystream alignment (again) 2019-11-20 18:47:11 +01:00
clk clk: keystone: Enable TISCI clocks if K3_ARCH 2019-11-24 08:19:48 +01:00
clocksource clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines 2019-11-24 08:19:57 +01:00
connector
cpufreq cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown 2019-10-29 09:20:08 +01:00
cpuidle cpuidle: menu: Fix wakeup statistics updates for polling state 2019-11-24 08:20:07 +01:00
crypto crypto: s5p-sss: Fix Fix argument list alignment 2019-11-20 18:47:43 +01:00
dax
dca
devfreq PM / devfreq: stopping the governor before device_unregister() 2019-11-24 08:19:36 +01:00
dio
dma dmaengine: timb_dma: Use proper enum in td_prep_slave_sg 2019-11-24 08:19:46 +01:00
dma-buf dma-buf/sw_sync: Synchronize signal vs syncpt free 2019-10-07 18:57:04 +02:00
edac EDAC: Correct DIMM capacity unit symbol 2019-11-20 18:47:15 +01:00
eisa
extcon extcon: cht-wc: Return from default case to avoid warnings 2019-11-20 18:45:26 +01:00
firewire
firmware firmware: dell_rbu: Make payload memory uncachable 2019-11-20 18:47:41 +01:00
fmc
fpga fpga: altera-ps-spi: Fix getting of optional confd gpio 2019-09-21 07:16:53 +02:00
fsi fsi: scom: Don't abort operations for minor errors 2019-09-06 10:22:19 +02:00
gnss
gpio gpiolib: Fix gpio_direction_* for single direction GPIOs 2019-11-20 18:47:22 +01:00
gpu msm/gpu/a6xx: Force of_dma_configure to setup DMA for GMU 2019-11-24 08:20:06 +01:00
hid HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring() 2019-11-12 19:20:54 +01:00
hsi
hv vmbus: keep pointer to ring buffer page 2019-11-20 18:47:31 +01:00
hwmon hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap' 2019-10-05 13:09:54 +02:00
hwspinlock
hwtracing coresight: dynamic-replicator: Handle multiple connections 2019-11-20 18:47:29 +01:00
i2c i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf() 2019-11-24 08:19:08 +01:00
ide
idle
iio iio: dac: mcp4922: fix error handling in mcp4922_write_raw 2019-11-20 18:45:21 +01:00
infiniband RDMA/hns: Limit the size of extend sge of sq 2019-11-24 08:20:04 +01:00
input Input: synaptics-rmi4 - destroy F54 poller workqueue when removing 2019-11-20 18:45:16 +01:00
iommu iommu/arm-smmu-v3: Fix unexpected CMD_SYNC timeout 2019-11-24 08:19:30 +01:00
ipack
irqchip irqchip/irq-mvebu-icu: Fix wrong private data retrieval 2019-11-24 08:19:40 +01:00
isdn net: use skb_queue_empty_lockless() in poll() handlers 2019-11-10 11:27:48 +01:00
leds led: triggers: Fix a memory leak bug 2019-10-05 13:09:45 +02:00
lightnvm lightnvm: pblk: fix freeing of merged pages 2019-07-26 09:14:09 +02:00
macintosh
mailbox mbox: qcom: add APCS child device for QCS404 2019-10-07 18:57:02 +02:00
mcb
md md: allow metadata updates while suspending an array - fix 2019-11-24 08:19:58 +01:00
media media: ov2680: fix null dereference at power on 2019-11-20 18:47:53 +01:00
memory
memstick memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()' 2019-10-29 09:20:07 +01:00
message
mfd mfd: intel-lpss: Remove D3cold delay 2019-10-07 18:57:08 +02:00
misc misc: genwqe: should return proper error value. 2019-11-20 18:47:31 +01:00
mmc mmc: sdhci-of-at91: fix quirk2 overwrite 2019-11-20 18:45:20 +01:00
mtd mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer 2019-11-24 08:19:55 +01:00
mux
net ixgbe: Fix crash with VFs and flow director on interface flap 2019-11-24 08:20:01 +01:00
nfc NFC: st21nfca: fix double free 2019-11-12 19:20:30 +01:00
ntb ntb: point to right memory window index 2019-10-11 18:21:18 +02:00
nubus
nvdimm libnvdimm/region: Initialize bad block for volatile namespaces 2019-10-11 18:21:20 +02:00
nvme nvme-multipath: fix possible io hang after ctrl reconnect 2019-11-12 19:21:11 +01:00
nvmem nvmem: core: return error code instead of NULL from nvmem_device_get 2019-11-20 18:46:31 +01:00
of of/unittest: Fix I2C bus unit-address error 2019-11-20 18:47:00 +01:00
opp OPP: Return error on error from dev_pm_opp_get_opp_count() 2019-11-24 08:20:06 +01:00
oprofile
parisc parisc: Disable HP HSC-PCI Cards to prevent kernel crash 2019-10-05 13:10:04 +02:00
parport parport: Fix mem leak in parport_register_dev_model 2019-06-25 11:35:55 +08:00
pci PCI/ERR: Run error recovery callbacks for all affected devices 2019-11-20 18:47:39 +01:00
pcmcia
perf drivers/perf: arm_pmu: Fix failure path in PM notifier 2019-08-06 19:06:55 +02:00
phy phy: lantiq: Fix compile warning 2019-11-20 18:47:35 +01:00
pinctrl pinctrl: at91: don't use the same irqchip with multiple gpiochips 2019-11-20 18:46:41 +01:00
platform platform/x86: pmc_atom: Add Siemens SIMATIC IPC227E to critclk_systems DMI table 2019-11-10 11:27:55 +01:00
pnp
power power: supply: twl4030_charger: disable eoc interrupt on linear charge 2019-11-20 18:47:01 +01:00
powercap
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-08-04 09:30:56 +02:00
ps3
ptp
pwm pwm: stm32-lp: Add check in case requested period cannot be achieved 2019-10-11 18:21:17 +02:00
rapidio drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings 2019-08-06 19:06:52 +02:00
ras RAS/CEC: Fix pfn insertion 2019-07-26 09:14:05 +02:00
regulator regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized 2019-11-10 11:27:15 +01:00
remoteproc remoteproc/davinci: Use %zx for formating size_t 2019-11-20 18:45:25 +01:00
reset
rpmsg rpmsg: glink: smem: Support rx peak for size less than 4 bytes 2019-11-24 08:20:05 +01:00
rtc rtc: armada38x: fix possible race condition 2019-11-20 18:47:52 +01:00
s390 s390/zcrypt: enable AP bus scan without a valid default domain 2019-11-20 18:47:07 +01:00
sbus
scsi scsi: NCR5380: Check for bus reset 2019-11-20 18:47:52 +01:00
sfi
sh
siox
slimbus silmbus: ngd: register controller after power up. 2019-11-20 18:47:30 +01:00
sn
soc drivers: qcom: rpmh-rsc: clear wait_for_compl after use 2019-11-20 18:46:38 +01:00
soundwire soundwire: intel: Fix uninitialized adev deref 2019-11-20 18:45:22 +01:00
spi spi: mediatek: use correct mata->xfer_len when in fifo transfer 2019-11-24 08:19:06 +01:00
spmi
ssb
staging media: imx: work around false-positive warning, again 2019-11-20 18:47:16 +01:00
target scsi: target: core: Do not overwrite CDB byte 1 2019-11-10 11:27:28 +01:00
tc
tee tee: optee: add missing of_node_put after of_device_is_available 2019-11-24 08:19:08 +01:00
thermal thermal_hwmon: Sanitize thermal_zone type 2019-10-11 18:21:19 +02:00
thunderbolt thunderbolt: Use 32-bit writes when writing ring producer/consumer 2019-11-06 13:06:12 +01:00
tty tty: serial: qcom_geni_serial: Fix serial when not used as console 2019-11-20 18:46:54 +01:00
uio vmbus: keep pointer to ring buffer page 2019-11-20 18:47:31 +01:00
usb usb: dwc3: gadget: Check ENBLSLPM before sending ep command 2019-11-24 08:19:39 +01:00
uwb
vfio vfio/pci: Mask buggy SR-IOV VF INTx support 2019-11-20 18:47:32 +01:00
vhost vhost: make sure log_num < in_num 2019-09-16 08:22:25 +02:00
video fbdev: Ditch fb_edid_add_monspecs 2019-11-24 08:19:14 +01:00
virt virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr 2019-11-06 13:06:04 +01:00
virtio
visorbus
vlynq
vme
w1
watchdog watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D 2019-11-24 08:19:43 +01:00
xen xen/pci: reserve MCFG areas earlier 2019-10-11 18:21:13 +02:00
zorro
Kconfig
Makefile