diff options
author | Kapileshwar Singh <kapileshwar.singh@arm.com> | 2015-06-22 15:30:40 +0100 |
---|---|---|
committer | Vincent Guittot <vincent.guittot@linaro.org> | 2015-08-10 17:56:53 +0200 |
commit | cc983f4c64b974586de4f2bc138d067530b56318 (patch) | |
tree | 8aa3b2cf2424985f4b2ace38dd0d814133e214c2 | |
parent | 33af7347a42241baf71e57d6fab5bb12f8adb622 (diff) |
WIP: PerfHack: Strict Fork Migration
Fork Migration was introduced for the HMP scheduler to give
tasks the initial boost at Fork Time. The Strict Fork
Migration ensures that every task is Forked on the Big CPU
even if the CPUs are already occupied.
Change-Id: I7e8a53138eb9e71a7c01a2ec6c56555bce696987
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
-rw-r--r-- | kernel/sched/fair.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1c0e0a6ee4fb..71c018133d74 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5549,18 +5549,6 @@ compare_group_capacity(struct sched_group *sg, struct sched_group *local) (local_total * sg->group_weight)); } -static int sg_nr_running_tasks(struct sched_group *group) -{ - int cpu, sum_nr_running = 0; - - for_each_cpu(cpu, sched_group_cpus(group)) { - struct rq *rq = cpu_rq(cpu); - sum_nr_running += rq->nr_running; - } - - return sum_nr_running; -} - /* This function returns the group with the CPUs having the * maximum capacity in the sched_domain. The group is only returned * if the number of tasks running in the group is less than or @@ -5584,8 +5572,7 @@ struct sched_group* highest_capacity_group(struct sched_domain *sd) { do { int capacity = group_max_capacity(sg); - if ((capacity > highest_cap) - && (sg_nr_running_tasks(sg) <= sg->group_weight)) { + if (capacity > highest_cap) { highest = sg; highest_cap = capacity; } @@ -5671,11 +5658,8 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f * because >= group_weight tasks are running on the group * use find_idlest_group to select the target group */ - if (sd->flags & SD_FORK_HIGHEST_CAP) { + if (sd->flags & SD_FORK_HIGHEST_CAP) group = highest_capacity_group(sd); - if (!group) - group = find_idlest_group(sd, p, cpu, sd_flag); - } else group = find_idlest_group(sd, p, cpu, sd_flag); |