sched: Improve the scheduler
This change is for general scheduler improvements. Change-Id: I37d6cb75ca8b08d9ca155b86b7d71ff369f46e14 Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org> Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
This commit is contained in:
1 parent
7865c5e4ea
commit
6b9b3223e4
2 files changed
+21
-2
No files matched your search
+5
-1
@@ -3817,8 +3817,12 @@ void scheduler_tick(void)
|
||||
if (curr->sched_class == &fair_sched_class)
|
||||
check_for_migration(rq, curr);
|
||||
|
||||
if (idle_cpu(cpu) && is_reserved(cpu))
|
||||
#ifdef CONFIG_SMP
|
||||
rq_lock(rq, &rf);
|
||||
if (idle_cpu(cpu) && is_reserved(cpu) && !rq->active_balance)
|
||||
clear_reserved(cpu);
|
||||
rq_unlock(rq, &rf);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
+16
-1
@@ -12838,12 +12838,23 @@ static void walt_rotate_work_func(struct work_struct *work)
|
||||
{
|
||||
struct walt_rotate_work *wr = container_of(work,
|
||||
struct walt_rotate_work, w);
|
||||
struct rq *src_rq = cpu_rq(wr->src_cpu), *dst_rq = cpu_rq(wr->dst_cpu);
|
||||
unsigned long flags;
|
||||
|
||||
migrate_swap(wr->src_task, wr->dst_task, wr->dst_cpu, wr->src_cpu);
|
||||
|
||||
put_task_struct(wr->src_task);
|
||||
put_task_struct(wr->dst_task);
|
||||
|
||||
local_irq_save(flags);
|
||||
double_rq_lock(src_rq, dst_rq);
|
||||
|
||||
dst_rq->active_balance = 0;
|
||||
src_rq->active_balance = 0;
|
||||
|
||||
double_rq_unlock(src_rq, dst_rq);
|
||||
local_irq_restore(flags);
|
||||
|
||||
clear_reserved(wr->src_cpu);
|
||||
clear_reserved(wr->dst_cpu);
|
||||
}
|
||||
@@ -12930,7 +12941,8 @@ static void walt_check_for_rotation(struct rq *src_rq)
|
||||
dst_rq = cpu_rq(dst_cpu);
|
||||
|
||||
double_rq_lock(src_rq, dst_rq);
|
||||
if (dst_rq->curr->sched_class == &fair_sched_class) {
|
||||
if (dst_rq->curr->sched_class == &fair_sched_class &&
|
||||
!src_rq->active_balance && !dst_rq->active_balance) {
|
||||
get_task_struct(src_rq->curr);
|
||||
get_task_struct(dst_rq->curr);
|
||||
|
||||
@@ -12943,7 +12955,10 @@ static void walt_check_for_rotation(struct rq *src_rq)
|
||||
|
||||
wr->src_cpu = src_cpu;
|
||||
wr->dst_cpu = dst_cpu;
|
||||
dst_rq->active_balance = 1;
|
||||
src_rq->active_balance = 1;
|
||||
}
|
||||
|
||||
double_rq_unlock(src_rq, dst_rq);
|
||||
|
||||
if (wr)
|
||||
|
||||
Reference in new issue
Block a user