On Fri, 31 Jan 2014 12:07:57 -0500
Steven Rostedt <rost...@goodmis.org> wrote:
 
> diff --git a/kernel/timer.c b/kernel/timer.c
> index 106968f..426d114 100644
> --- a/kernel/timer.c
> +++ b/kernel/timer.c
> @@ -1461,18 +1461,20 @@ void run_local_timers(void)
>        * the timer softirq.
>        */
>  #ifdef CONFIG_PREEMPT_RT_FULL
> +     /* On RT, irq work runs from softirq */
> +     if (irq_work_needs_cpu()) {
> +             raise_softirq(TIMER_SOFTIRQ);
> +             return;
> +     }
> +
>       if (!spin_do_trylock(&base->lock)) {
>               raise_softirq(TIMER_SOFTIRQ);
>               return;
>       }
>  #endif

Note, I debated about doing:

        if (irq_work_needs_cpu() ||
            !spin_do_trylock(&base->lock)) {
                raise_softirq(TIMER_SOFTIRQ);
                return;
        }

instead, which is pretty much the same code. But I find it rather ugly,
and does not read as well. I haven't looked at the disassembly, but I
would hope that gcc would make my original version have the same result
as this one.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to