diff options
author | Chris Redpath <chris.redpath@arm.com> | 2014-08-12 14:50:54 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2014-08-12 17:46:57 +0100 |
commit | f83262408293795e5186e9d1bf66d525b24fdb12 (patch) | |
tree | 2a4cb0856459aad5c54c29e78ae7decb8801a75e /kernel/sched/fair.c | |
parent | 65abdc9b50378783981ed2f3453a0aae090404e4 (diff) |
HMP: Do not fork-boost tasks coming from PIDs <= 2
System services are generally started by init, whilst kernel threads
are started by kthreadd. We do not want to give those tasks a head
start, as this costs power for very little benefit. We do however
wish to do that for tasks which the user launches.
Further, some tasks allocate per-cpu timers directly after launch
which can lead to those tasks being always scheduled on a big CPU
when there is no computational need to do so. Not promoting services
to big CPUs on launch will prevent that unless a service allocates
their per-cpu resources after a period of intense computation, which
is not a common pattern.
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 161da1ab3995..74a5adfefeb7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4358,7 +4358,7 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags) #ifdef CONFIG_SCHED_HMP /* always put non-kernel forking tasks on a big domain */ - if (p->mm && (sd_flag & SD_BALANCE_FORK)) { + if (unlikely(sd_flag & SD_BALANCE_FORK) && hmp_task_should_forkboost(p)) { new_cpu = hmp_select_faster_cpu(p, prev_cpu); if (new_cpu != NR_CPUS) { hmp_next_up_delay(&p->se, new_cpu); |