summaryrefslogtreecommitdiff
path: root/kernel/sched/tune.c
diff options
context:
space:
mode:
authorPatrick Bellasi <patrick.bellasi@arm.com>2016-07-29 16:09:03 +0100
committerJohn Stultz <john.stultz@linaro.org>2016-08-11 14:26:50 -0700
commitb9534b8f0128efdb00865af03106a45ce9d489cb (patch)
tree08857c9e03713f6dbbfb9db99d108af41d5e12c1 /kernel/sched/tune.c
parent93db70f21c7bf04dfe5bb3345400da8f97c3ad29 (diff)
FIXUP: sched/tune: do initialization as a postcore_initicall
SchedTune needs to walk the scheduling domains to compute the energy normalization constants used for PE space filtering. To build such constants we need the energy model data for each CPU in the system. However, by walking the SDs as a late initcall stage, the userspace has been already initialized and it could happen that some CPUs are hotplugged out. For example, this could happen if a user-space thermal manager daemon detects that CPUs are to much hot during the boot process. To avoid such a race condition we can anticipate the SchedTune initialization code to be a postcore_initicall. This allows to keep the SchedTune initialization code as simple as an initcall while still safely relaying on SDs provided data. Such calls are executed before user-space is initialized and thus, apart from the case of unlucky early-init kernel space generated hotplugs, this solution should be safe enough to get all the data we need. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> [jstultz: fwdported to 4.4] Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/sched/tune.c')
-rw-r--r--kernel/sched/tune.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c
index 644f8e9ee96f..bd7f319ce53e 100644
--- a/kernel/sched/tune.c
+++ b/kernel/sched/tune.c
@@ -946,4 +946,4 @@ nodata:
rcu_read_unlock();
return -EINVAL;
}
-late_initcall(schedtune_init);
+postcore_initcall(schedtune_init);