Re: Does smp_reschedule_interrupt really reschedule?

From: Ingo Molnar
Date: Sat May 14 2005 - 09:29:47 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> In finish_task_switch, we have:
>
> #if defined(CONFIG_PREEMPT_RT) && defined(CONFIG_SMP)
> /*
> * If we pushed an RT task off the runqueue,
> * then kick other CPUs, they might run it:
> */
> if (unlikely(rt_task(current) && prev->array && rt_task(prev))) {
> rt_overload_schedule++;
> smp_send_reschedule_allbutself();
> }
> #endif
>
>
> Here's my question, where does CPU1 get need_resched set? As
> discussed earlier, smp_send_reschedule_allbutself doesn't do it.

hm, you are right - the 'kick other CPUs' portion of RT-overload
handling (which is a new scheduler feature currently being tested in the
-RT kernel) is missing this step. So we might as well force a reschedule
from the IPI handler - the way you suggested it. We might overdo
scheduling a bit, but it cannot hurt - and it will definitely make a
difference for the case where an RT task is waiting to be run.

the vanilla kernel is not affected.

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