From fb8d6602af1cbc09115544056b872b976c6349c3 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Wed, 24 Aug 2011 17:32:21 +0200 Subject: Prevent Linux to send IPI and queue tasks on remote CPUs. Whether to send IPIs and enqueue tasks on remote runqueues is plugin-specific. The recent ttwu_queue() mechanism (by calling ttwu_queue_remote()) interferes with Litmus plugin decisions. --- kernel/sched.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/sched.c b/kernel/sched.c index 935f8e8e6160..baaca61bc3a3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2661,7 +2661,12 @@ static void ttwu_queue(struct task_struct *p, int cpu) struct rq *rq = cpu_rq(cpu); #if defined(CONFIG_SMP) - if (sched_feat(TTWU_QUEUE) && cpu != smp_processor_id()) { + /* + * LITMUS^RT: whether to send an IPI to the remote CPU + * is plugin specific. + */ + if (!is_realtime(p) && + sched_feat(TTWU_QUEUE) && cpu != smp_processor_id()) { sched_clock_cpu(cpu); /* sync clocks x-cpu */ ttwu_queue_remote(p, cpu); return; -- cgit v1.2.2