Commit afdf472d authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Avoid updating system time for sub-jiffy interrupts

Updating system time and reprogramming timer can cause latency
issues on busy systems with lots of interrupts with constant
updating of time and reprogramming the system timer.

If a non-timer dyntick interrupt happens within a jiffy from
the last interrupt, updating time and reprogramming the timer
is unnecessary as we will get a timer interrupt soon anyways.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 0af779e2
...@@ -221,6 +221,17 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id, ...@@ -221,6 +221,17 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id,
static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id, static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id,
struct pt_regs *regs) struct pt_regs *regs)
{ {
unsigned long now;
now = omap_32k_sync_timer_read();
/* Don't bother reprogramming timer if last tick was before next
* jiffie. We will get another interrupt when previously programmed
* timer expires. This cuts down interrupt load quite a bit.
*/
if (now - omap_32k_last_tick < OMAP_32K_TICKS_PER_HZ)
return IRQ_HANDLED;
return _omap_32k_timer_interrupt(irq, dev_id, regs); return _omap_32k_timer_interrupt(irq, dev_id, regs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment