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

Commit e96bc193 authored by Maria Yu's avatar Maria Yu
Browse files

sched/fair: Avoid cpu idle to deep sleep when have active balance



Avoid cpu idle to deep sleep when have active balance
task to be coming.

Change-Id: Ie1c0f7fe0ff3da38d0a8f5ebe974080a52b7e6f4
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
parent a396ef7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10288,6 +10288,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
				busiest->active_balance = 1;
				busiest->push_cpu = this_cpu;
				active_balance = 1;
				mark_reserved(this_cpu);
			}
			raw_spin_unlock_irqrestore(&busiest->lock, flags);

@@ -10612,6 +10613,7 @@ static int active_load_balance_cpu_stop(void *data)
	busiest_rq->active_balance = 0;
	push_task = busiest_rq->push_task;
	target_cpu = busiest_rq->push_cpu;
	clear_reserved(target_cpu);

	if (push_task)
		busiest_rq->push_task = NULL;
@@ -10622,7 +10624,6 @@ static int active_load_balance_cpu_stop(void *data)
		if (push_task_detached)
			attach_one_task(target_rq, push_task);
		put_task_struct(push_task);
		clear_reserved(target_cpu);
	}

	if (p)