From d0b971c53d4b15975753e2e9528e4691c208635d Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Thu, 13 Apr 2017 18:58:56 +0530 Subject: [PATCH] core_ctl: Handle only CPU_ONLINE and CPU_DEAD notifications We are interested in only CPU_ONLINE and CPU_DEAD notifications. Don't do anything when other notifications arrive. Change-Id: Iea2e0e1c93e67ef278ee7c5a9813fbab6cea5c74 Signed-off-by: Pavankumar Kondeti --- kernel/sched/core_ctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core_ctl.c b/kernel/sched/core_ctl.c index fd7290a5e2a1..ccf67255a909 100644 --- a/kernel/sched/core_ctl.c +++ b/kernel/sched/core_ctl.c @@ -887,10 +887,9 @@ static int __ref cpu_callback(struct notifier_block *nfb, struct cpu_data *state = &per_cpu(cpu_state, cpu); struct cluster_data *cluster = state->cluster; unsigned int need; - int ret = NOTIFY_OK; if (unlikely(!cluster || !cluster->inited)) - return NOTIFY_OK; + return NOTIFY_DONE; switch (action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: @@ -921,13 +920,15 @@ static int __ref cpu_callback(struct notifier_block *nfb, state->busy = 0; cluster->active_cpus = get_active_cpu_count(cluster); break; + default: + return NOTIFY_DONE; } need = apply_limits(cluster, cluster->need_cpus); if (adjustment_possible(cluster, need)) wake_up_core_ctl_thread(cluster); - return ret; + return NOTIFY_OK; } static struct notifier_block __refdata cpu_notifier = {