lkml.org 
[lkml]   [2003]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjecttoo much timer simplification...
It appears to me that this changeset:

http://linux.bkbits.net:8080/linux-2.5/diffs/kernel/timer.c@1.48

may have gone a little too far.

What I'm seeing is that if someone happens to arm a periodic timer at
exactly 256 jiffies (as ohci happens to do on platforms with HZ=1024),
then you end up getting an endless loop of timer activations, causing
a machine hang.

The problem is that __run_timers updates base->timer_jiffies _before_
running the callback routines. If a callback re-arms the timer at
exactly 256 jiffies, add_timers() will reinsert the timer into the
list that we're currently processing, which of course will cause the
timer to expire immediately again, etc., etc., ad naseum...

I'll leave it as an exercise to the readers to come up with the proper
patch. (The old code looked fine to me. My cheesy quick workaround
is to round up 256 ticks to 257 ticks; might not make the soft RT
folks too happy though... ;-)

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

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.476 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site