Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9afb1aa authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

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: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 59e0dc4c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -89,6 +89,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>
@@ -3393,6 +3394,7 @@ void scheduler_tick(void)
	if (curr->sched_class == &fair_sched_class)
		check_for_migration(rq, curr);

	if (cpu == tick_do_timer_cpu)
		core_ctl_check(wallclock);
	sched_freq_tick(cpu);
}