-- On Sat, 13 Oct 2007, Peter Zijlstra wrote: > On Fri, 2007-10-12 at 20:15 -0400, Gregory Haskins wrote: > > > +/* Push all tasks that we can to other CPUs */ > > +static void push_rt_tasks(struct rq *this_rq) > > +{ > > + while (push_rt_task(this_rq)); > > +} > > I'd like to see an additional termination condition to this loop (might > just be paranoia though). Well if this fails to terminate, then we have a major bug. Perhaps we can add something like this: { int count = NR_CPUS * 2; while (push_rt_tasks(this_rq) && count--) ; BUG_ON(!count); } Since we should do it really at most CPU times, and I added a CPU * 2 just to be safe that we don't have a unrealistic point of moving tasks onto other CPUS and have them finish before we finish this loop. But really, I don't think we need to worry too much about that while loop going too long. It terminates when there's no more RT tasks to migrate off to other CPUs that have lower priority tasks. Hmm, the thing we need to be careful with here is that we need to change the prio of the CPU, otherwise we can a task to a CPU even though a higher one was already queued. /me plays to fix that! -- Steve - To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html