summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram Mulukutla <markivx@codeaurora.org>2017-01-10 15:19:35 -0800
committerVikram Mulukutla <markivx@codeaurora.org>2017-01-18 09:45:44 -0800
commite7dd50fa46d3e1397da7ef880c8d411a7839b566 (patch)
tree6fcb68baaf6624453d3e6dcf14a9388992f08887
parent2768f0352b7eed4213bfadf55856b5d8fdb1c9d1 (diff)
sched: hmp: Remove the global sysctl_sched_enable_colocation tunable
Colocation in HMP includes a tunable that turns on or off the feature globally across all colocation groups. Supporting this tunable correctly would result in complexity that would outweigh any foreseeable benefits. For example, disabling the feature globally would involve deleting all colocation groups one by one while ensuring no placement decisions are made during the process. Remove the tunable. Adding or removing a task from a colocation group is still possible and so we're not losing functionality. Change-Id: I4cb8bcdbee98d3bdd168baacbac345eca9ea8879 Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
-rw-r--r--include/linux/sched/sysctl.h1
-rw-r--r--kernel/sched/hmp.c13
-rw-r--r--kernel/sysctl.c9
3 files changed, 2 insertions, 21 deletions
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 0538de6dfb6f..93ba93a4e7a7 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -64,7 +64,6 @@ extern unsigned int sysctl_sched_boost;
extern unsigned int sysctl_sched_small_wakee_task_load_pct;
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;
extern unsigned int sysctl_sched_new_task_windows;
extern unsigned int sysctl_sched_pred_alert_freq;
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index 36b0d3d8286b..935ea8a24399 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -704,8 +704,6 @@ __read_mostly unsigned int sysctl_sched_window_stats_policy =
__read_mostly unsigned int sysctl_sched_cpu_high_irqload = (10 * NSEC_PER_MSEC);
-unsigned int __read_mostly sysctl_sched_enable_colocation = 1;
-
/*
* Enable colocation and frequency aggregation for all threads in a process.
* The children inherits the group id from the parent.
@@ -1278,14 +1276,12 @@ void reset_hmp_stats(struct hmp_sched_stats *stats, int reset_cra)
int preferred_cluster(struct sched_cluster *cluster, struct task_struct *p)
{
struct related_thread_group *grp;
- int rc = 0;
+ int rc = 1;
rcu_read_lock();
grp = task_related_thread_group(p);
- if (!grp || !sysctl_sched_enable_colocation)
- rc = 1;
- else
+ if (grp)
rc = (grp->preferred_cluster == cluster);
rcu_read_unlock();
@@ -3740,11 +3736,6 @@ static void _set_preferred_cluster(struct related_thread_group *grp)
bool group_boost = false;
u64 wallclock;
- if (!sysctl_sched_enable_colocation) {
- grp->last_update = sched_ktime_clock();
- return;
- }
-
if (list_empty(&grp->tasks))
return;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 12ea4f09c04b..1a9aa7deb039 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -411,15 +411,6 @@ static struct ctl_table kern_table[] = {
.extra1 = &zero,
},
{
- .procname = "sched_enable_colocation",
- .data = &sysctl_sched_enable_colocation,
- .maxlen = sizeof(unsigned int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- .extra1 = &zero,
- .extra2 = &one,
- },
- {
.procname = "sched_restrict_cluster_spill",
.data = &sysctl_sched_restrict_cluster_spill,
.maxlen = sizeof(unsigned int),