On Fri, Jul 22, 2005 at 08:21:25PM +0100, Paulo Marques wrote: > Tom Marshall wrote: > >The patch to fix "setitimer timer expires too early" is causing issues for > >the Helix server. We have a timer processs that updates the server's > >timestamp on an itimer and it expects the signal to be delivered at roughly > >the interval retrieved from getitimer. This is very consistent on every > >platform, including Linux up to 2.6.11, but breaks on 2.6.12. On 2.6.12, > >setting the itimer to 10ms and retrieving the actual interval from > >getitimer > >reports 10.998ms, but the timer interrupts are consistently delivered at > >roughly 11.998ms. > > Unfortunately, this is not so clear cut as it seems :( Yes, I am sure that it is not a simple problem. I am not a kernel developer but I imagine that issues such as NTP adjustments would complicate this issue. I must also admit that I am not intimately familiar with the POSIX spec regarding itimers. Our current code does a setitimer followed by getitimer, then uses the actual interval retrieved by getitimer to set a global timer delta. On each timer signal, it updates the notion of the current time by the timer delta. As mentioned, this works on every other platform (Solaris, BSD, HPUX, AIX, DGUX, IRIX, Tru64, and Linux up to 2.6.11) but breaks on 2.6.12. This is not an insurmountable problem for userspace. It can be easily solved by using gettimeofday in the timer interrupt instead of adding the delta to the current time blindly. No big deal. I just wanted to point this issue out and ensure that (1) it was a known issue, and (2) it is the direction that the Linux kernel intends to take. If so, no big deal and we can modify the timer code to take that into account. -- Apathy Club meeting this Friday. If you want to come, you're not invited.
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- [PATCH] Re: itimer oddness in 2.6.12
- From: George Anzinger <[email protected]>
- [PATCH] Re: itimer oddness in 2.6.12
- References:
- itimer oddness in 2.6.12
- From: Tom Marshall <[email protected]>
- Re: itimer oddness in 2.6.12
- From: Paulo Marques <[email protected]>
- itimer oddness in 2.6.12
- Prev by Date: RE: Memory Management
- Next by Date: Re: a 15 GB file on tmpfs
- Previous by thread: Re: itimer oddness in 2.6.12
- Next by thread: [PATCH] Re: itimer oddness in 2.6.12
- Index(es):