1
0
Fork 0
remarkable-linux/drivers
Viresh Kumar 27719a5032 cpufreq: Add android's 'interactive' governor
Interactive governor has lived in Android sources for a very long time
and this commit is based on the code present in following branch:

https://android.googlesource.com/kernel/common android-4.4

The Interactive governor is designed for latency-sensitive workloads,
such as interactive user interfaces like the mobile phones and tablets.
The interactive governor aims to be significantly more responsive to
ramp CPU quickly up when CPU-intensive activity begins.

Existing governors sample CPU load at a particular rate, typically every
X ms and then update the frequency from a work-handler.  This can lead
to under-powering UI threads for the period of time during which the
user begins interacting with a previously-idle system until the next
sample period happens.

The 'interactive' governor uses a different approach.

A real-time thread is used for scaling up, giving the remaining tasks
the CPU performance benefit, unlike existing governors which are more
likely to schedule ramp-up work to occur after your performance starved
tasks have completed.

The Android version of interactive governor also checks whether to scale
the CPU frequency up soon after coming out of idle.  When the CPU comes
out of idle, the governor check if the CPU sampling is overdue or not.
If yes, it immediately starts the sampling.  Otherwise, the utilization
hooks from the scheduler handle the sampling later.  If the CPU is very
busy from exiting idle to when the evaluation happens, then it assumes
that the CPU is under-powered and ramps it to MAX speed.

If the CPU was not sufficiently busy to immediately ramp to MAX speed,
then the governor evaluates the CPU load since the last speed
adjustment, choosing the highest value between that longer-term load or
the short-term load since idle exit to determine the CPU speed to ramp
to.

Idle notifiers will be be handled later and are not included for now.

The core of this code is written and maintained (in Android
repositories) by Mike Chan and Todd Poyner over a long period of time.

Vireshk has made changes to to the governor to align it with the current
practices followed with mainline governors, like using utilization hooks
from the scheduler and handling kobject (for governor's sysfs directory)
in a race free manner. And of course this included general cleanup of
the governor as well.

Signed-off-by: Mike Chan <mike@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2018-10-29 11:10:38 +08:00
..
accessibility
acpi ACPI / scan: Initialize status to ACPI_STA_DEFAULT 2018-09-15 09:45:30 +02:00
amba ARM: amba: Don't read past the end of sysfs "driver_override" buffer 2018-05-01 12:58:21 -07:00
android android: binder: fix the race mmap and alloc_new_buf_locked 2018-09-19 22:43:35 +02:00
ata MLK-11444 ata: imx: cmd buf corruption errata bug fix 2018-10-29 11:10:38 +08:00
atm atm: zatm: Fix potential Spectre v1 2018-07-22 14:28:43 +02:00
auxdisplay auxdisplay: fix broken menu 2018-07-03 11:24:56 +02:00
base PM / core: Clear the direct_complete flag on errors 2018-10-13 09:27:25 +02:00
bcma
block floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl 2018-10-03 17:00:54 -07:00
bluetooth Bluetooth: hci_ldisc: Free rw_semaphore on close 2018-10-18 09:16:21 +02:00
bus drivers/perf: arm-ccn: don't log to dmesg in event_init 2018-08-03 07:50:31 +02:00
cdrom cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status 2018-09-05 09:26:42 +02:00
char MLK-11894 imx: sema4: fix the out of bounds write 2018-10-29 11:10:38 +08:00
clk MLK-11016 arm: clk: enable m4 root clk when m4 core is running 2018-10-29 11:10:38 +08:00
clocksource MLK-11300-04 ARM: imx: add gpt timer support on imx6ul 2018-10-29 11:10:38 +08:00
connector
cpufreq cpufreq: Add android's 'interactive' governor 2018-10-29 11:10:38 +08:00
cpuidle cpuidle: powernv: Fix promotion from snooze if next state disabled 2018-07-03 11:24:51 +02:00
crypto crypto: chelsio - Fix memory corruption in DMA Mapped buffers. 2018-10-13 09:27:28 +02:00
dax dev-dax: check_vma: ratelimit dev_info-s 2018-08-24 13:09:08 +02:00
dca
devfreq PM / devfreq: Fix potential NULL pointer dereference in governor_store 2018-04-12 12:32:13 +02:00
dio
dma MLK-12076-3: dma: imx-sdma: add imx6ul device type 2018-10-29 11:10:38 +08:00
dma-buf dma-buf: remove redundant initialization of sg_table 2018-06-05 11:41:57 +02:00
edac EDAC: Fix memleak in module init error path 2018-10-03 17:00:53 -07:00
eisa
extcon extcon: Release locking when sending the notification of connector state 2018-09-09 19:55:56 +02:00
firewire firewire-ohci: work around oversized DMA reads on JMicron controllers 2018-04-26 11:02:03 +02:00
firmware efi/esrt: Only call efi_mem_reserve() for boot services memory 2018-09-26 08:38:10 +02:00
fmc
fpga fpga-manager: altera-ps-spi: preserve nCONFIG state 2018-05-01 12:58:24 -07:00
fsi
gpio MLK-10449-1: 74x164: Add new property registers-default 2018-10-29 11:10:38 +08:00
gpu Revert "drm/imx: imx-ldb: disable LDB on driver bind" 2018-10-29 11:10:38 +08:00
hid HID: quirks: fix support for Apple Magic Keyboards 2018-10-20 09:48:53 +02:00
hsi
hv Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect() 2018-10-10 08:54:28 +02:00
hwmon MLK-11556-1 pmic: max17135: add hwmon, mfd and regulator drivers for this pmic 2018-10-29 11:10:38 +08:00
hwspinlock
hwtracing intel_th: pci: Add Ice Lake PCH support 2018-10-20 09:48:50 +02:00
i2c MLK-11403: I2C: imx: restore pin setting for i2c 2018-10-29 11:10:38 +08:00
ide cdrom: do not call check_disk_change() inside cdrom_open() 2018-05-30 07:52:34 +02:00
idle intel_idle: Graceful probe failure when MWAIT is disabled 2018-08-09 12:16:39 +02:00
iio MLK-11476 iio: adc: Enable i.MX6SX adc driver. 2018-10-29 11:10:38 +08:00
infiniband IB/hfi1: Fix destroy_qp hang after a link down 2018-10-20 09:48:54 +02:00
input MLK-10142-1 touchscreen: elan: add elan touch screen driver support 2018-10-29 11:10:38 +08:00
iommu iommu/amd: Return devid as alias for ACPI HID devices 2018-10-20 09:48:52 +02:00
ipack
irqchip irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP 2018-09-15 09:45:29 +02:00
isdn isdn: Disable IIOCDBGVAR 2018-08-22 07:46:11 +02:00
leds leds: pm8058: Silence pointer to integer size warning 2018-03-19 08:42:50 +01:00
lightnvm lightnvm: pblk: free padded entries in write buffer 2018-09-15 09:45:35 +02:00
macintosh macintosh/via-pmu: Add missing mmio accessors 2018-09-19 22:43:41 +02:00
mailbox mailbox: xgene-slimpro: Fix potential NULL pointer dereference 2018-09-09 19:55:54 +02:00
mcb
md dm linear: fix linear_end_io conditional definition 2018-10-18 09:16:24 +02:00
media MLK-12060 media: output: pxp_v4l2: Add filter function for dma_request_channel 2018-10-29 11:10:38 +08:00
memory memory: tegra: Apply interrupts mask per SoC 2018-08-03 07:50:38 +02:00
memstick
message scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() 2018-05-25 16:17:47 +02:00
mfd MLK-11933 mfd: mxc-hdmi-core: null check substream before using it 2018-10-29 11:10:38 +08:00
misc MLK-11418 misc: sram: Set default alignment to 4Kbytes 2018-10-29 11:10:38 +08:00
mmc MLK-10629-4 mmc: sdhci: remove MMC_CAP_NEEDS_POLL 2018-10-29 11:10:38 +08:00
mtd MLK-11940: add two more commands support for qspi 2018-10-29 11:10:38 +08:00
mux
mxc MLK-11910 mxc: mlb: fix irq unsigned_compare issue 2018-10-29 11:10:38 +08:00
net MLK-10211 can: flexcan: fix resume failed issue 2018-10-29 11:10:38 +08:00
nfc NFC: pn533: Fix wrong GFP flag usage 2018-08-24 13:09:06 +02:00
ntb ntb_transport: Fix bug with max_mw_size parameter 2018-04-26 11:02:13 +02:00
nubus
nvdimm libnvdimm: fix ars_status output length calculation 2018-09-09 19:56:01 +02:00
nvme nvme_fc: fix ctrl create failures racing with workq items 2018-10-13 09:27:28 +02:00
nvmem nvmem: Don't let a NULL cell_id for nvmem_cell_get() crash us 2018-08-24 13:09:14 +02:00
of of: unittest: Disable interrupt node tests for old world MAC systems 2018-10-13 09:27:27 +02:00
oprofile
parisc parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode 2018-05-30 07:52:28 +02:00
parport parport: sunbpp: fix error return code 2018-09-26 08:38:12 +02:00
pci MLK-11803 pci: imx: imx6qp pcie ep self-test failed 2018-10-29 11:10:38 +08:00
pcmcia PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle 2018-05-30 07:52:39 +02:00
perf arm64: perf: Reject stand-alone CHAIN events for PMUv3 2018-10-18 09:16:24 +02:00
phy phy: phy-mtk-tphy: use auto instead of force to bypass utmi signals 2018-08-15 18:12:48 +02:00
pinctrl MLK-11281-3 pinctrl: pinctrl-imx: add suspend/resume for LPSR 2018-10-29 11:10:38 +08:00
platform platform/x86: alienware-wmi: Correct a memory leak 2018-09-29 03:06:03 -07:00
pnp
power MLK-11703-4: sabresd_battery: fix usb charger detect when resume back on mx6sl 2018-10-29 11:10:38 +08:00
powercap
pps
ps3
ptp ptp: fix missing break in switch 2018-07-25 11:25:10 +02:00
pwm pwm: meson: Fix mux clock names 2018-09-15 09:45:27 +02:00
rapidio
ras
regulator MLK-11465-1: regulator: pfuze100: update voltage setting for SW1A of PF3000 2018-10-29 11:10:38 +08:00
remoteproc remoteproc: qcom: Fix potential device node leaks 2018-06-21 04:02:48 +09:00
reset MLK-11395-2: reset: build in CONFIG_RESET_GPIO by default 2018-10-29 11:10:38 +08:00
rpmsg MLK-11498 rpmsg: imx: tell remote process about the channel 2018-10-29 11:10:38 +08:00
rtc rtc: bq4802: add error handling for devm_ioremap 2018-09-26 08:38:13 +02:00
s390 s390/cio: Fix how vfio-ccw checks pinned pages 2018-10-18 09:16:23 +02:00
sbus
scsi MLK-11444 ata: imx: cmd buf corruption errata bug fix 2018-10-29 11:10:38 +08:00
sfi
sh
sn
soc MLK-13479-1: ARM: imx: gpc: delay 2us instead of sw+sw2iso delay 2018-10-29 11:10:38 +08:00
spi MLK-9817 spi: imx: convert all clk_enable to clk_prepare_enable 2018-10-29 11:10:38 +08:00
spmi
ssb
staging staging: ccree: check DMA pool buf !NULL before free 2018-10-20 09:48:53 +02:00
target scsi: iscsi: target: Don't use stack buffer for scatterlist 2018-10-18 09:16:21 +02:00
tc
tee tee: check shm references are consistent in offset/size 2018-06-21 04:02:54 +09:00
thermal MLK-12072 thermal: imx: enable tempmon finish bit check on imx7d TO1.1 2018-10-29 11:10:38 +08:00
thunderbolt thunderbolt: Prevent crash when ICM firmware is not running 2018-04-24 09:36:29 +02:00
tty MLK-11456-01 tty: serial: imx: add pinctrl sleep mode support 2018-10-29 11:10:38 +08:00
uio uio: potential double frees if __uio_register_device() fails 2018-09-19 22:43:40 +02:00
usb MLK-11896-3 usb: chipidea: imx: add NULL check for usbmisc_data 2018-10-29 11:10:38 +08:00
uwb uwb: hwa-rc: fix memory leak at probe 2018-10-03 17:00:46 -07:00
vfio vfio/type1: Fix task tracking for QEMU vCPU hotplug 2018-08-03 07:50:23 +02:00
vhost vhost: correctly check the iova range when waking virtqueue 2018-09-15 09:45:25 +02:00
video MLK-11920 video: fbdev: mxc ipuv3 fb: Use fb_set_var() to unblank a framebuffer 2018-10-29 11:10:38 +08:00
virt
virtio virtio_balloon: fix increment of vb->num_pfns in fill_balloon() 2018-10-13 09:27:30 +02:00
vlynq
vme
w1 1wire: family module autoload fails because of upper/lower case mismatch. 2018-07-03 11:24:47 +02:00
watchdog watchdog: da9063: Fix updating timeout value 2018-08-03 07:50:24 +02:00
xen xen: fix GCC warning and remove duplicate EVTCHN_ROW/EVTCHN_COL usage 2018-10-10 08:54:26 +02:00
zorro zorro: Set up z->dev.dma_mask for the DMA API 2018-05-30 07:52:30 +02:00
Kconfig MLK-11355 driver/mxc: add mxc special driver 2018-10-29 11:10:38 +08:00
Makefile MLK-11355 driver/mxc: add mxc special driver 2018-10-29 11:10:38 +08:00