summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2015-06-19 13:03:11 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:20 -0700
commit87fe20de7e7c54fd00a1acea8e84a70756bf9922 (patch)
tree86112001808745671d2edb249af6296f9f48fdc6 /drivers/base
parentd590f251533a39ac3f061dcf6e9e3b9cf8a89b4d (diff)
sched: Update the wakeup placement logic for fair and rt tasks
For the fair sched class, update the select_best_cpu() policy to do power based placement. The hope is to minimize the voltage at which the CPU runs. While RT tasks already do power based placement, their placement preference has to now take into account the power cost of all tasks on a given CPU. Also remove the check for sched_boost since sched_boost no longer intends to elevate all tasks to the highest capacity cluster. Change-Id: Ic6a7625c97d567254d93b94cec3174a91727cb87 Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/cpu.c173
1 files changed, 0 insertions, 173 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index d84a4d646975..91bbb1959d8d 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -180,180 +180,10 @@ static struct attribute_group crash_note_cpu_attr_group = {
};
#endif
-#ifdef CONFIG_SCHED_HMP
-static ssize_t show_sched_mostly_idle_load(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- ssize_t rc;
- int cpunum;
- int mostly_idle_pct;
-
- cpunum = cpu->dev.id;
-
- mostly_idle_pct = sched_get_cpu_mostly_idle_load(cpunum);
-
- rc = snprintf(buf, PAGE_SIZE-2, "%d\n", mostly_idle_pct);
-
- return rc;
-}
-
-static ssize_t __ref store_sched_mostly_idle_load(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- int cpuid = cpu->dev.id;
- int mostly_idle_load, err;
-
- err = kstrtoint(strstrip((char *)buf), 0, &mostly_idle_load);
- if (err)
- return err;
-
- err = sched_set_cpu_mostly_idle_load(cpuid, mostly_idle_load);
- if (err >= 0)
- err = count;
-
- return err;
-}
-
-static ssize_t show_sched_mostly_idle_freq(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- ssize_t rc;
- int cpunum;
- unsigned int mostly_idle_freq;
-
- cpunum = cpu->dev.id;
-
- mostly_idle_freq = sched_get_cpu_mostly_idle_freq(cpunum);
-
- rc = snprintf(buf, PAGE_SIZE-2, "%d\n", mostly_idle_freq);
-
- return rc;
-}
-
-static ssize_t __ref store_sched_mostly_idle_freq(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- int cpuid = cpu->dev.id, err;
- unsigned int mostly_idle_freq;
-
- err = kstrtoint(strstrip((char *)buf), 0, &mostly_idle_freq);
- if (err)
- return err;
-
- err = sched_set_cpu_mostly_idle_freq(cpuid, mostly_idle_freq);
- if (err >= 0)
- err = count;
-
- return err;
-}
-
-static ssize_t show_sched_mostly_idle_nr_run(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- ssize_t rc;
- int cpunum;
- int mostly_idle_nr_run;
-
- cpunum = cpu->dev.id;
-
- mostly_idle_nr_run = sched_get_cpu_mostly_idle_nr_run(cpunum);
-
- rc = snprintf(buf, PAGE_SIZE-2, "%d\n", mostly_idle_nr_run);
-
- return rc;
-}
-
-static ssize_t __ref store_sched_mostly_idle_nr_run(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- int cpuid = cpu->dev.id;
- int mostly_idle_nr_run, err;
-
- err = kstrtoint(strstrip((char *)buf), 0, &mostly_idle_nr_run);
- if (err)
- return err;
-
- err = sched_set_cpu_mostly_idle_nr_run(cpuid, mostly_idle_nr_run);
- if (err >= 0)
- err = count;
-
- return err;
-}
-
-static ssize_t show_sched_prefer_idle(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- ssize_t rc;
- int cpunum;
- int prefer_idle;
-
- cpunum = cpu->dev.id;
-
- prefer_idle = sched_get_cpu_prefer_idle(cpunum);
-
- rc = snprintf(buf, PAGE_SIZE-2, "%d\n", prefer_idle);
-
- return rc;
-}
-
-static ssize_t __ref store_sched_prefer_idle(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct cpu *cpu = container_of(dev, struct cpu, dev);
- int cpuid = cpu->dev.id;
- int prefer_idle, err;
-
- err = kstrtoint(strstrip((char *)buf), 0, &prefer_idle);
- if (err)
- return err;
-
- err = sched_set_cpu_prefer_idle(cpuid, prefer_idle);
- if (err >= 0)
- err = count;
-
- return err;
-}
-
-static DEVICE_ATTR(sched_mostly_idle_freq, 0664, show_sched_mostly_idle_freq,
- store_sched_mostly_idle_freq);
-static DEVICE_ATTR(sched_mostly_idle_load, 0664, show_sched_mostly_idle_load,
- store_sched_mostly_idle_load);
-static DEVICE_ATTR(sched_mostly_idle_nr_run, 0664,
- show_sched_mostly_idle_nr_run, store_sched_mostly_idle_nr_run);
-static DEVICE_ATTR(sched_prefer_idle, 0664,
- show_sched_prefer_idle, store_sched_prefer_idle);
-
-static struct attribute *hmp_sched_cpu_attrs[] = {
- &dev_attr_sched_mostly_idle_load.attr,
- &dev_attr_sched_mostly_idle_nr_run.attr,
- &dev_attr_sched_mostly_idle_freq.attr,
- &dev_attr_sched_prefer_idle.attr,
- NULL
-};
-
-static struct attribute_group sched_hmp_cpu_attr_group = {
- .attrs = hmp_sched_cpu_attrs,
-};
-
-#endif /* CONFIG_SCHED_HMP */
static const struct attribute_group *common_cpu_attr_groups[] = {
#ifdef CONFIG_KEXEC
&crash_note_cpu_attr_group,
#endif
-#ifdef CONFIG_SCHED_HMP
- &sched_hmp_cpu_attr_group,
-#endif
NULL
};
@@ -361,9 +191,6 @@ static const struct attribute_group *hotplugable_cpu_attr_groups[] = {
#ifdef CONFIG_KEXEC
&crash_note_cpu_attr_group,
#endif
-#ifdef CONFIG_SCHED_HMP
- &sched_hmp_cpu_attr_group,
-#endif
NULL
};