lkml.org 
[lkml]   [2011]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] sched: select eligible run-queue for RT task
From
When selecting run-queue for a given task, eligible run-queue should be
returned by checking the CPU affinity of task.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---
kernel/sched_rt.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 88725c9..45b3e0a 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1006,7 +1006,8 @@ select_task_rq_rt(struct task_struct *p, int
sd_flag, int flags)
int cpu;

if (sd_flag != SD_BALANCE_WAKE)
- return smp_processor_id();
+ return cpumask_test_cpu(smp_processor_id(), &p->cpus_allowed) ?
+ smp_processor_id() : task_cpu(p);

cpu = task_cpu(p);
rq = cpu_rq(cpu);

\
 
 \ /
  Last update: 2011-06-03 16:09    [W:0.043 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site