Messages in this thread | | | Date | Fri, 11 Apr 2003 00:05:36 -0700 | From | David Mosberger <> | Subject | too 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/
| |