sched/core: Add first cpu w/ max/min orig capacity to root domain
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Sun, 8 Jan 2017 16:16:59 +0000 (16:16 +0000)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 21 Jun 2017 11:07:32 +0000 (16:37 +0530)
commit8ceb7db7d2cfde150b2906fccb0483f3ed54b4b4
treee4b84e59868be1a2dd2e7b6aa14137683a26839f
parent8b871f71e32e48921599f308a66f5420dac7f7de
sched/core: Add first cpu w/ max/min orig capacity to root domain

This will allow to start iterating from a cpu with max or min original
capacity in the wakeup path regardless on which cpu the scheduler is
currently running (smp_processor_id()) or the previous cpu of the task
(task_cpu(p)). This iteration has to happen on a sched_domain spanning
all cpus in the order of the sched_groups of this sched_domain seen by
the starting cpu.

In case of an SMP system the first cpu with max orig capacity and the
the one with min orig capacity is the same. This can temporally happen
on a big.LITTLE system with hotplug as well.

E.g. the different order of cpu iteration can be used to map schedtune
task parameter 'boosted' into the cpu iteration order in
find_best_target().

Use of READ_ONCE()/WRITE_ONCE() to avoid load/store tearing.

Change-Id: I812fbd9c7e5f506617e456c0eec3edcd2c016e92
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
(cherry picked from commit fd6e9543c1fd8971a5e2e68e39b2f6e591d46114)
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/core.c
kernel/sched/sched.h