[PATCH v4 17/20] RT: restore the migratable conditional
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Tue, 20 Nov 2007 20:01:11 -0500
From: Gregory Haskins <ghaskins@xxxxxxxxxx>
We don't need to bother searching if the task cannot be migrated
Signed-off-by: Gregory Haskins <ghaskins@xxxxxxxxxx>
Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
---
kernel/sched_rt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-compile.git/kernel/sched_rt.c
===================================================================
--- linux-compile.git.orig/kernel/sched_rt.c 2007-11-20 19:53:11.000000000 -0500
+++ linux-compile.git/kernel/sched_rt.c 2007-11-20 19:53:13.000000000 -0500
@@ -173,7 +173,8 @@ static int select_task_rq_rt(struct task
* that is just being woken and probably will have
* cold cache anyway.
*/
- if (unlikely(rt_task(rq->curr))) {
+ if (unlikely(rt_task(rq->curr)) &&
+ (p->nr_cpus_allowed > 1)) {
int cpu = find_lowest_rq(p);
return (cpu == -1) ? task_cpu(p) : cpu;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH v4 00/20] New RT Balancing version 4
- From: Steven Rostedt
- [PATCH v4 00/20] New RT Balancing version 4
- Prev by Date: [PATCH v4 14/20] RT: Optimize our cpu selection based on topology
- Next by Date: [PATCH v4 12/20] RT: Allow current_cpu to be included in search
- Previous by thread: [PATCH v4 14/20] RT: Optimize our cpu selection based on topology
- Next by thread: [PATCH v4 12/20] RT: Allow current_cpu to be included in search
- Index(es):
Relevant Pages
|