Skip to contentSkip to conversation

no need for 'affine wakeup' balancing in select_task_rq_fair() when task_cpu(p) == this_cpu

PATCH Applied Dmitry Adamushko 2 participants 2 messages Dec 9, 2007 – Dec 10, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 no need for 'affine wakeup' balancing in select_task_rq_fair() when task_cpu(p) == this_cpu

From: Dmitry Adamushko <[email protected]>

No need to do a check for 'affine wakeup and passive balancing possibilities' in select_task_rq_fair() when task_cpu(p) == this_cpu.

I guess, this part got missed upon introduction of per-sched_class select_task_rq() in try_to_wake_up().

---

kernel/sched_fair.c +3 -0
index f881fc5..2208692 100644
@@ -925,6 +925,9 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
 	this_cpu = smp_processor_id();
 	new_cpu  = cpu;
 
+	if (cpu == this_cpu)
+		goto out_set_cpu;
+
 	for_each_domain(this_cpu, sd) {
 		if (cpu_isset(cpu, sd->span)) {
 			this_sd = sd;
Applied
#1 lore raw
Quoted 7 lines · Dmitry Adamushko

From: Dmitry Adamushko <[email protected]>

No need to do a check for 'affine wakeup and passive balancing possibilities' in select_task_rq_fair() when task_cpu(p) == this_cpu.

I guess, this part got missed upon introduction of per-sched_class select_task_rq() in try_to_wake_up().

thanks, applied.

Ingo