summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2017-03-21 15:03:35 +0530
committerPavankumar Kondeti <pkondeti@codeaurora.org>2017-03-21 15:14:24 +0530
commitd71b1a76b1a797648ec6740f1a206e597d6b139a (patch)
tree4acf9949038746630b48f8f794cce216af5fb0dc
parentf39a5999e2473e890390e3a5aa794a2fd4256544 (diff)
sched/core_ctl: Fix state_lock spinlock contention
There is no need to call core_ctl_check() from scheduler tick path on all CPUs. This results in core_ctl's state_lock spin lock contention. Assign this job to the CPU which is responsible for updating the ticks. Change-Id: I9664037cc25c204d532bdd0f006c7e27ef143497 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
-rw-r--r--kernel/sched/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 312ffdad034a..1017a3f77391 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -88,6 +88,7 @@
#include "sched.h"
#include "../workqueue_internal.h"
#include "../smpboot.h"
+#include "../time/tick-internal.h"
#define CREATE_TRACE_POINTS
#include <trace/events/sched.h>
@@ -3260,7 +3261,8 @@ void scheduler_tick(void)
if (curr->sched_class == &fair_sched_class)
check_for_migration(rq, curr);
- core_ctl_check(wallclock);
+ if (cpu == tick_do_timer_cpu)
+ core_ctl_check(wallclock);
}
#ifdef CONFIG_NO_HZ_FULL