Re: Real Time Runqueue

Mike Kravetz (kravetz@us.ibm.com)
Fri, 16 Nov 2001 15:47:01 -0800


On Fri, Nov 16, 2001 at 02:44:30PM -0800, Davide Libenzi wrote:
>
> I do not use a separate queue coz, if it's single, it becomes a common
> lock for all CPUs.
> RT tasks are scheduled as usual and the only problem arises in
> reschedule_idle() when an RT task is pushed onto the run queue when
> 1) on its CPU it is _not_ running the idle
> 2) on its CPU is running another RT task with higher priority
>
> In that case a "good CPU" discovery loop is triggered, the task is moved
> on that CPU runqueue, need_resched is set, an IPI is sent and on return
> from the remote CPU IPI path the RT task is run.
> A good solution would be ( i'm not doing it now ), in setscheduler() to
> move the task in a way to have an even distribution of RT tasks among
> CPUs.
>
> - Davide

Davide,

Suppose you have a 2 CPU system with 4 runnable tasks. 3 of these
tasks are realtime with the same realtime priority and the other is
an ordinary SCHED_OTHER task. The task distribution on the runqueues
looks something like this.

CPU 0 CPU 1
--------- ---------
RT Task A RT Task B
Other Task C RT Task D

Task A and Task B are currently running on the 2 CPUs. Now, Task A
voluntarily gives up CPU 0 and Task B is still running on CPU 1.
At this point, Task D should be chosen to run on CPU 0. Correct?
Isn't this a required RT semantic? I'm curious how you plan on
accomplishing this.

Regards,

-- 
Mike
-
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/