diff options
| author | Junjie Wu <junjiew@codeaurora.org> | 2015-08-19 15:45:37 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:03:27 -0700 |
| commit | 093a9c53b9f76c25e602b33821486cdb20fcfa0d (patch) | |
| tree | 547dc1455b01c2b81f4a4bf6c555323eb0bb2ce3 | |
| parent | 0d694cbd7eedb1297969ebf3a84fa0e1f3eeaeed (diff) | |
cpufreq: interactive: Ignore hispeed_freq logic for notification
When governor gets a notification from scheduler, scheduler provides
exact load that is required by the workload. Ignore hispeed_freq logic
and directly use choose_freq result for notifications.
Also use is_notif field to distinguish notifications instead of
MAX_LOCAL_LOAD.
Change-Id: I409ea66c00f4277adf32d18c339631e1a8b0f97b
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
| -rw-r--r-- | drivers/cpufreq/cpufreq_interactive.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index a909317597f8..15a9e6d0fb9f 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -147,8 +147,10 @@ struct cpufreq_interactive_tunables { */ unsigned int max_freq_hysteresis; - /* Whether to change frequency immediately for notification */ - bool fast_ramp_up; + /* Ignore hispeed_freq and above_hispeed_delay for notification */ + bool ignore_hispeed_on_notif; + + /* Ignore min_sample_time for notification */ bool fast_ramp_down; }; @@ -451,7 +453,6 @@ static u64 update_load(int cpu) return now; } -#define MAX_LOCAL_LOAD 100 static void __cpufreq_interactive_timer(unsigned long data, bool is_notif) { u64 now; @@ -531,9 +532,10 @@ static void __cpufreq_interactive_timer(unsigned long data, bool is_notif) cpu_load = loadadjfreq / ppol->target_freq; tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime; - if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) { - if (ppol->target_freq < tunables->hispeed_freq && - (!tunables->fast_ramp_up || cpu_load <= MAX_LOCAL_LOAD)) { + if (tunables->ignore_hispeed_on_notif && is_notif) { + new_freq = choose_freq(ppol, loadadjfreq); + } else if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) { + if (ppol->target_freq < tunables->hispeed_freq) { new_freq = tunables->hispeed_freq; } else { new_freq = choose_freq(ppol, loadadjfreq); @@ -548,7 +550,7 @@ static void __cpufreq_interactive_timer(unsigned long data, bool is_notif) new_freq = tunables->hispeed_freq; } - if ((!tunables->fast_ramp_up || cpu_load <= MAX_LOCAL_LOAD) && + if ((!tunables->ignore_hispeed_on_notif || !is_notif) && ppol->target_freq >= tunables->hispeed_freq && new_freq > ppol->target_freq && now - ppol->hispeed_validate_time < @@ -981,7 +983,7 @@ static ssize_t store_##file_name( \ } show_store_one(max_freq_hysteresis); show_store_one(align_windows); -show_store_one(fast_ramp_up); +show_store_one(ignore_hispeed_on_notif); show_store_one(fast_ramp_down); static ssize_t show_go_hispeed_load(struct cpufreq_interactive_tunables @@ -1375,7 +1377,7 @@ show_store_gov_pol_sys(use_sched_load); show_store_gov_pol_sys(use_migration_notif); show_store_gov_pol_sys(max_freq_hysteresis); show_store_gov_pol_sys(align_windows); -show_store_gov_pol_sys(fast_ramp_up); +show_store_gov_pol_sys(ignore_hispeed_on_notif); show_store_gov_pol_sys(fast_ramp_down); #define gov_sys_attr_rw(_name) \ @@ -1404,7 +1406,7 @@ gov_sys_pol_attr_rw(use_sched_load); gov_sys_pol_attr_rw(use_migration_notif); gov_sys_pol_attr_rw(max_freq_hysteresis); gov_sys_pol_attr_rw(align_windows); -gov_sys_pol_attr_rw(fast_ramp_up); +gov_sys_pol_attr_rw(ignore_hispeed_on_notif); gov_sys_pol_attr_rw(fast_ramp_down); static struct global_attr boostpulse_gov_sys = @@ -1430,7 +1432,7 @@ static struct attribute *interactive_attributes_gov_sys[] = { &use_migration_notif_gov_sys.attr, &max_freq_hysteresis_gov_sys.attr, &align_windows_gov_sys.attr, - &fast_ramp_up_gov_sys.attr, + &ignore_hispeed_on_notif_gov_sys.attr, &fast_ramp_down_gov_sys.attr, NULL, }; @@ -1457,7 +1459,7 @@ static struct attribute *interactive_attributes_gov_pol[] = { &use_migration_notif_gov_pol.attr, &max_freq_hysteresis_gov_pol.attr, &align_windows_gov_pol.attr, - &fast_ramp_up_gov_pol.attr, + &ignore_hispeed_on_notif_gov_pol.attr, &fast_ramp_down_gov_pol.attr, NULL, }; |
