[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1391178845-15837-2-git-send-email-bigeasy@linutronix.de>
Date: Fri, 31 Jan 2014 15:34:05 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: linux-rt-users@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, rostedt@...dmis.org,
tglx@...utronix.de,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH 2/2] timer: really raise softirq if there is irq_work to do
from looking at the code, it seems that the softirq is only raised (in
the !base->active_timers case) if we have also an expired timer
(time_before_eq() is true). This patch ensures that the timer softirq is
also raised in the !base->active_timers && no timer expired.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
kernel/timer.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kernel/timer.c b/kernel/timer.c
index 6b3c172..b04c879 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1453,6 +1453,7 @@ static void run_timer_softirq(struct softirq_action *h)
void run_local_timers(void)
{
struct tvec_base *base = __this_cpu_read(tvec_bases);
+ bool need_raise = false;
hrtimer_run_queues();
/*
@@ -1470,12 +1471,17 @@ void run_local_timers(void)
#ifdef CONFIG_PREEMPT_RT_FULL
/* On RT, irq work runs from softirq */
if (!irq_work_needs_cpu())
-#endif
goto out;
+ need_raise = true;
+#else
+ goto out;
+#endif
}
/* Check whether the next pending timer has expired */
if (time_before_eq(base->next_timer, jiffies))
+ need_raise = true;
+ if (need_raise)
raise_softirq(TIMER_SOFTIRQ);
out:
#ifdef CONFIG_PREEMPT_RT_FULL
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists