Hi,
If slow path frequency changes are conducted in a SCHED_OTHER context
then they may be delayed for some amount of time, including
indefinitely, when real time or deadline activity is taking place.
Move the slow path to a real time kernel thread using the kthread worker
infrastructure. In the future the thread should be made SCHED_DEADLINE.
The RT priority is arbitrarily set to 50 for now.
This was tested with Hackbench on ARM Exynos, dual core A15 platform and
no regressions were seen. The second patch has more details on it.
This work was started by Steve Muckle, where he used a simple kthread
instead of kthread-worker and that wasn't sufficient as some guarantees
weren't met.
I was wondering if the same should be done for ondemand/conservative
governors as well ?
--
viresh
Viresh Kumar (3):
cpufreq: schedutil: enable fast switch earlier
cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task
cpufreq: schedutil: irq-work is used only in slow path
kernel/sched/cpufreq_schedutil.c | 85 ++++++++++++++++++++++++++++++----------
1 file changed, 65 insertions(+), 20 deletions(-)
--
2.7.1.410.g6faf27b
Tree/Branch: next-20161114
Git describe: next-20161114
Commit: b60de3eba5 Add linux-next specific files for 20161114
Build Time: 88 min 46 sec
Passed: 10 / 10 (100.00 %)
Failed: 0 / 10 ( 0.00 %)
Errors: 0
Warnings: 5
Section Mismatches: 4
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
12 warnings 2 mismatches : arm64-allmodconfig
10 warnings 2 mismatches : arm-allmodconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Warnings Summary: 5
16 ../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
2 ../drivers/staging/iio/frequency/ad9832.c:214:11: warning: 'st' may be used uninitialized in this function [-Wmaybe-uninitialized]
2 ../drivers/scsi/hpsa.c:8223:40: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
2 ../drivers/gpio/gpiolib-acpi.c:925:9: warning: 'lflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
2 ../drivers/gpio/gpiolib-acpi.c:925:7: warning: 'dflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
Section Mismatch Summary: 4
1 WARNING: vmlinux.o(.text+0x791ca4): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
1 WARNING: vmlinux.o(.text+0x548560): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
1 WARNING: drivers/built-in.o(.text+0x1a365c): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
1 WARNING: drivers/built-in.o(.text+0x1105d8): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 12 warnings, 2 section mismatches
Warnings:
../drivers/gpio/gpiolib-acpi.c:925:9: warning: 'lflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/gpio/gpiolib-acpi.c:925:7: warning: 'dflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/staging/iio/frequency/ad9832.c:214:11: warning: 'st' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/scsi/hpsa.c:8223:40: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
Section Mismatches:
WARNING: drivers/built-in.o(.text+0x1a365c): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
WARNING: vmlinux.o(.text+0x791ca4): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 10 warnings, 2 section mismatches
Warnings:
../drivers/scsi/hpsa.c:8223:40: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/staging/iio/frequency/ad9832.c:214:11: warning: 'st' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
../drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
Section Mismatches:
WARNING: drivers/built-in.o(.text+0x1105d8): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
WARNING: vmlinux.o(.text+0x548560): Section mismatch in reference from the function fsl_guts_probe() to the function .init.text:of_flat_dt_get_machine_name()
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../drivers/gpio/gpiolib-acpi.c:925:9: warning: 'lflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/gpio/gpiolib-acpi.c:925:7: warning: 'dflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
x86_64-defconfig
arm-allnoconfig
x86_64-allnoconfig
arm-multi_v4t_defconfig
Tree/Branch: master
Git describe: v4.9-rc4-194-g86e4ee7
Commit: 86e4ee760e Merge tag 'acpi-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Build Time: 86 min 34 sec
Passed: 10 / 10 (100.00 %)
Failed: 0 / 10 ( 0.00 %)
Errors: 0
Warnings: 3
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm-allmodconfig
-------------------------------------------------------------------------------
Warnings Summary: 3
2 ../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
2 ../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
../include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
x86_64-defconfig
arm-allnoconfig
x86_64-allnoconfig
arm-multi_v4t_defconfig
arm64-defconfig
Tree/Branch: master
Git describe: v4.9-rc4-171-g5f3a5cb
Commit: 5f3a5cb8e7 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Build Time: 87 min 20 sec
Passed: 10 / 10 (100.00 %)
Failed: 0 / 10 ( 0.00 %)
Errors: 0
Warnings: 3
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm-allmodconfig
-------------------------------------------------------------------------------
Warnings Summary: 3
2 ../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
2 ../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
../include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
x86_64-defconfig
arm-allnoconfig
x86_64-allnoconfig
arm-multi_v4t_defconfig
arm64-defconfig
Tree/Branch: master
Git describe: v4.9-rc4-107-g015ed94
Commit: 015ed9433b Merge branch 'maybe-uninitialized' (patches from Arnd)
Build Time: 87 min 22 sec
Passed: 10 / 10 (100.00 %)
Failed: 0 / 10 ( 0.00 %)
Errors: 0
Warnings: 3
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm-allmodconfig
-------------------------------------------------------------------------------
Warnings Summary: 3
2 ../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
2 ../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
../include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../sound/soc/qcom/lpass-platform.c:83:29: warning: 'dma_ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
x86_64-defconfig
arm-allnoconfig
x86_64-allnoconfig
arm-multi_v4t_defconfig
arm64-defconfig