The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Efficient use of low-precision kernel timers
@ 2007-07-10 18:59 Alan Stern
  2007-07-10 20:28 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2007-07-10 18:59 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Oliver Neukum, Kernel development list

Thomas:

Here's a question for you or anyone else who can help.

I've got a low-precision kernel timer, with a delay measured in seconds
(and rounded off to a second boundary).  Under some circumstances the
timer might be cancelled and restarted many times in quick succession
(a few thousand times perhaps).  Alternatively the timer could simply
be allowed to expire and then restarted, with the callback routine
doing a rather small amount of work.

Which is the most efficient?  Or to put it another way, how many times 
can I cancel and restart a low-precision timer before it uses up as 
much CPU time as allowing the timer to expire once?

Is there a reasonable way to answer this?  I can't think of any good 
tests.  Or is the difference in overhead so small as to be meaningless?

Alan Stern


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

end of thread, other threads:[~2007-07-10 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10 18:59 Efficient use of low-precision kernel timers Alan Stern
2007-07-10 20:28 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox