Distribution: SuSE Hardware Environment: i386 32bits Software Environment: Problem Description: The setitimer man page states: " Timers will never expire before the requested time, instead expiring some short, constant time afterwards, dependent on the system timer resolution (currently 10ms). " This requirement is not fulfilled for all Linux kernels that I have tested. You will find a test program below. There is a bunch of premature timer expirations, and there is a pattern in there: For kernel 2.6, timers between "n" ms - 300 us and "n" ms expire too early For kernel 2.4, timers between 10*"n" ms - 600 us and 10*"n" ms expire too early Steps to reproduce: See program
Created attachment 5003 [details] See LKML discussion also -
Created attachment 5004 [details] Results for kernel 2.4 and 2.6
Created attachment 5005 [details] Program to test
Hey George, I know you were workign on something similar recently. Is this the same bug?
> ------- Additional Comments From johnstul@us.ibm.com 2005-08-08 11:28 > ------- > Hey George, I know you were workign on something similar recently. Is this > the > same bug? I don't think so. There was a recent problem with timers expiring too late, especially periodic where a +1 was NOT needed (we know where we are WRT jiffy in this case). But I am not aware of a real problem with too early. I will take a look at the test program here and let you know. >
This is fixed in 2.6.12, however, incorrectly. There is a patch in Linus' tree to fix it correctly. If I had the power, I would mark as "PATCH_ALREADY_AVAILABLE" and close.
Thanks George! ocroquette: Could you confirm this is fixed in 2.6.13-rc6? If so I'll close this.