Skip to content

Commit

Permalink
Merge branch 'pm-cpuidle'
Browse files Browse the repository at this point in the history
* pm-cpuidle:
  drivers/cpuidle: make cpuidle-exynos.c explicitly non-modular
  drivers/cpuidle: make cpuidle-ux500.c explicitly non-modular
  drivers/cpuidle: make cpuidle-clps711x.c explicitly non-modular
  cpuidle,menu: smooth out measured_us calculation
  cpuidle,menu: use interactivity_req to disable polling
  cpuidle,x86: increase forced cut-off for polling to 20us
  • Loading branch information
Rafael J. Wysocki committed Jan 12, 2016
2 parents 92266e1 + 8459923 commit a7da481
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
8 changes: 2 additions & 6 deletions drivers/cpuidle/cpuidle-clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <linux/cpuidle.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>

#define CLPS711X_CPUIDLE_NAME "clps711x-cpuidle"
Expand Down Expand Up @@ -56,8 +56,4 @@ static struct platform_driver clps711x_cpuidle_driver = {
.name = CLPS711X_CPUIDLE_NAME,
},
};
module_platform_driver_probe(clps711x_cpuidle_driver, clps711x_cpuidle_probe);

MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>");
MODULE_DESCRIPTION("CLPS711X CPU idle driver");
MODULE_LICENSE("GPL");
builtin_platform_driver_probe(clps711x_cpuidle_driver, clps711x_cpuidle_probe);
5 changes: 2 additions & 3 deletions drivers/cpuidle/cpuidle-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/cpuidle.h>
#include <linux/cpu_pm.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/platform_data/cpuidle-exynos.h>
Expand Down Expand Up @@ -142,5 +142,4 @@ static struct platform_driver exynos_cpuidle_driver = {
.name = "exynos_cpuidle",
},
};

module_platform_driver(exynos_cpuidle_driver);
builtin_platform_driver(exynos_cpuidle_driver);
5 changes: 2 additions & 3 deletions drivers/cpuidle/cpuidle-ux500.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* published by the Free Software Foundation.
*/

#include <linux/module.h>
#include <linux/init.h>
#include <linux/cpuidle.h>
#include <linux/spinlock.h>
#include <linux/atomic.h>
Expand Down Expand Up @@ -124,5 +124,4 @@ static struct platform_driver dbx500_cpuidle_plat_driver = {
},
.probe = dbx500_cpuidle_probe,
};

module_platform_driver(dbx500_cpuidle_plat_driver);
builtin_platform_driver(dbx500_cpuidle_plat_driver);
6 changes: 4 additions & 2 deletions drivers/cpuidle/governors/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
* We want to default to C1 (hlt), not to busy polling
* unless the timer is happening really really soon.
*/
if (data->next_timer_us > 5 &&
if (interactivity_req > 20 &&
!drv->states[CPUIDLE_DRIVER_STATE_START].disabled &&
dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0)
data->last_state_idx = CPUIDLE_DRIVER_STATE_START;
Expand Down Expand Up @@ -404,8 +404,10 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
measured_us = cpuidle_get_last_residency(dev);

/* Deduct exit latency */
if (measured_us > target->exit_latency)
if (measured_us > 2 * target->exit_latency)
measured_us -= target->exit_latency;
else
measured_us /= 2;

/* Make sure our coefficients do not exceed unity */
if (measured_us > data->next_timer_us)
Expand Down

0 comments on commit a7da481

Please sign in to comment.