linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question: queuing timer interrupts
@ 2008-07-21 18:04 soohoon lee
  2008-07-22  5:50 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: soohoon lee @ 2008-07-21 18:04 UTC (permalink / raw)
  To: linux-kernel


Hi,
I like to ask you experts what would be a better way to solve following problem and side effects of my solution.

There is a system and sometimes it should unavoidably block interrupts for critical jobs for couple of 10ms so will lost timer ticks.
But keeping the wall clock is also critical.
I thought about two solutions.
1. update wall clock when OS gets out of the critical section.
2. Add a hardware to count lost timer ticks, it's easy for this system.
   So when the OS is able to process interrupts again, the hardware generates timer interrupts back to back to compensate lost ticks.

Thanks in advance,
Soohoon.



      

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question: queuing timer interrupts
  2008-07-21 18:04 Question: queuing timer interrupts soohoon lee
@ 2008-07-22  5:50 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2008-07-22  5:50 UTC (permalink / raw)
  To: soohoon_lee; +Cc: linux-kernel

soohoon lee <soohoon_lee@yahoo.com> writes:

> There is a system and sometimes it should unavoidably block interrupts for critical jobs for couple of 10ms so will lost timer ticks.
> But keeping the wall clock is also critical.
> I thought about two solutions.
> 1. update wall clock when OS gets out of the critical section.
> 2. Add a hardware to count lost timer ticks, it's easy for this system.
>    So when the OS is able to process interrupts again, the hardware generates timer interrupts back to back to compensate lost ticks.

noidlehz should handle this all correctly already. You could just
treat your critical section like the idle loop and calling all the
timer hooks around it. The only subtle issue is that the delay should
not exceed the capability of the platform timer to tick without
overflow.

-Andi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-22  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-21 18:04 Question: queuing timer interrupts soohoon lee
2008-07-22  5:50 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).