[patch] signal-latency-2.5.69-B0

Ingo Molnar (mingo@elte.hu)
Mon, 26 May 2003 11:55:20 +0200 (CEST)


the attached patch, against BK-curr, further optimizes the 'kick wakeup'
scheduler feature:

- do not kick any CPU on UP

- no need to mark the target task for reschedule - it's enough to send an
interrupt to that CPU, that will initiate a signal processing pass.

tested on x86 SMP and UP.

Ingo

--- linux/kernel/sched.c.orig
+++ linux/kernel/sched.c
@@ -500,9 +500,12 @@ repeat_lock_task:
resched_task(rq->curr);
}
success = 1;
- } else
- if (unlikely(kick) && task_running(rq, p))
- resched_task(rq->curr);
+ }
+#if CONFIG_SMP
+ else
+ if (unlikely(kick) && task_running(rq, p) && (p->thread_info->cpu != smp_processor_id()))
+ smp_send_reschedule(p->thread_info->cpu);
+#endif
p->state = TASK_RUNNING;
}
task_rq_unlock(rq, &flags);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/