summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-07-28 19:18:08 -0700
committerSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-08-22 11:37:22 -0700
commit62f2600ce97a18db675289ae471286267d7d268e (patch)
treeebcb18a2a90f928e117d7a704fd31878187aba3d /include/linux
parent9b6911e89aef49ea96ae64f8fe75317227d9f04f (diff)
sched: Remove all existence of CONFIG_SCHED_FREQ_INPUT
CONFIG_SCHED_FREQ_INPUT was created to keep parts of the scheduler dealing with frequency separate from other parts of the scheduler that deal with task placement. However, overtime the two features have become intricately linked whereby SCHED_FREQ_INPUT cannot be turned on without having SCHED_HMP turned on as well. Given this complex inter-dependency and the fact that all old, existing and future targets use both config options, remove this unnecessary feature separation. It will aid in making kernel upgrades a lot simpler and faster. Change-Id: Ia20e40d8a088d50909cc28f5be758fa3e9a4af6f Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h53
-rw-r--r--include/linux/sched/sysctl.h16
2 files changed, 28 insertions, 41 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c326611099d7..d7f67d0b9644 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1305,12 +1305,10 @@ struct ravg {
u64 mark_start;
u32 sum, demand;
u32 sum_history[RAVG_HIST_SIZE_MAX];
-#ifdef CONFIG_SCHED_FREQ_INPUT
u32 curr_window, prev_window;
u16 active_windows;
u32 pred_demand;
u8 busy_buckets[NUM_BUSY_BUCKETS];
-#endif
};
struct sched_entity {
@@ -2152,32 +2150,6 @@ static inline cputime_t task_gtime(struct task_struct *t)
extern void task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st);
extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st);
-struct sched_load {
- unsigned long prev_load;
- unsigned long new_task_load;
- unsigned long predicted_load;
-};
-
-#if defined(CONFIG_SCHED_FREQ_INPUT)
-extern int sched_set_window(u64 window_start, unsigned int window_size);
-extern unsigned long sched_get_busy(int cpu);
-extern void sched_get_cpus_busy(struct sched_load *busy,
- const struct cpumask *query_cpus);
-extern void sched_set_io_is_busy(int val);
-#else
-static inline int sched_set_window(u64 window_start, unsigned int window_size)
-{
- return -EINVAL;
-}
-static inline unsigned long sched_get_busy(int cpu)
-{
- return 0;
-}
-static inline void sched_get_cpus_busy(struct sched_load *busy,
- const struct cpumask *query_cpus) {};
-static inline void sched_set_io_is_busy(int val) {};
-#endif
-
/*
* Per process flags
*/
@@ -2360,13 +2332,23 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
}
#endif
+struct sched_load {
+ unsigned long prev_load;
+ unsigned long new_task_load;
+ unsigned long predicted_load;
+};
+
extern int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle);
extern u32 sched_get_wake_up_idle(struct task_struct *p);
extern int sched_set_group_id(struct task_struct *p, unsigned int group_id);
extern unsigned int sched_get_group_id(struct task_struct *p);
#ifdef CONFIG_SCHED_HMP
-
+extern int sched_set_window(u64 window_start, unsigned int window_size);
+extern unsigned long sched_get_busy(int cpu);
+extern void sched_get_cpus_busy(struct sched_load *busy,
+ const struct cpumask *query_cpus);
+extern void sched_set_io_is_busy(int val);
extern int sched_set_boost(int enable);
extern int sched_set_init_task_load(struct task_struct *p, int init_load_pct);
extern u32 sched_get_init_task_load(struct task_struct *p);
@@ -2383,6 +2365,19 @@ extern void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, int dstate,
int wakeup_energy, int wakeup_latency);
#else /* CONFIG_SCHED_HMP */
+static inline int sched_set_window(u64 window_start, unsigned int window_size)
+{
+ return -EINVAL;
+}
+static inline unsigned long sched_get_busy(int cpu)
+{
+ return 0;
+}
+static inline void sched_get_cpus_busy(struct sched_load *busy,
+ const struct cpumask *query_cpus) {};
+
+static inline void sched_set_io_is_busy(int val) {};
+
static inline int sched_set_boost(int enable)
{
return -EINVAL;
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 4ed8c818f6d5..c60075de415b 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -40,20 +40,14 @@ extern unsigned int sysctl_sched_min_granularity;
extern unsigned int sysctl_sched_wakeup_granularity;
extern unsigned int sysctl_sched_child_runs_first;
extern unsigned int sysctl_sched_wake_to_idle;
+
+#ifdef CONFIG_SCHED_HMP
+extern int sysctl_sched_freq_inc_notify;
+extern int sysctl_sched_freq_dec_notify;
extern unsigned int sysctl_sched_window_stats_policy;
extern unsigned int sysctl_sched_ravg_hist_size;
extern unsigned int sysctl_sched_cpu_high_irqload;
-
-#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
extern unsigned int sysctl_sched_init_task_load_pct;
-#endif
-
-#ifdef CONFIG_SCHED_FREQ_INPUT
-extern int sysctl_sched_freq_inc_notify;
-extern int sysctl_sched_freq_dec_notify;
-#endif
-
-#ifdef CONFIG_SCHED_HMP
extern unsigned int sysctl_sched_spill_nr_run;
extern unsigned int sysctl_sched_spill_load_pct;
extern unsigned int sysctl_sched_upmigrate_pct;
@@ -65,11 +59,9 @@ extern unsigned int sysctl_sched_big_waker_task_load_pct;
extern unsigned int sysctl_sched_select_prev_cpu_us;
extern unsigned int sysctl_sched_enable_colocation;
extern unsigned int sysctl_sched_restrict_cluster_spill;
-#if defined(CONFIG_SCHED_FREQ_INPUT)
extern unsigned int sysctl_sched_new_task_windows;
extern unsigned int sysctl_sched_pred_alert_freq;
extern unsigned int sysctl_sched_freq_aggregate;
-#endif
#else /* CONFIG_SCHED_HMP */