lkml.org 
[lkml]   [2003]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectChange of setitimer() handling in 2.6.0-testX against 2.5.69 (and 2.4.x) ?
Date
There was previously a linux-kernel mailing list thread about scheduling 
degration (actually change of nanosleep timeout handling). I am not so
interrested in nanosleep, but I do have an application using setitimer().

I did some test code and noticed that it_interval handling in
setitimer(ITIMER_REAL ...) has also changed:

- machine is otherwise idle, SMP, threads RT priority or not
- SIGALRM comes in average every 1 ms in 2.5.x (and 1000 Hz patched 2.4.x)
- SIGALRM comes in average every 2 ms in 2.6.0-test11 (also 2.6.0-test8)

Setting of the timer:

it.it_value.tv_sec = 0;
it.it_value.tv_usec = 1000;
it.it_interval.tv_sec = 0;
it.it_interval.tv_usec = 1000;
setitimer(ITIMER_REAL,&it,NULL);

Of course when asked for longer timeouts, the 1 ms difference remains.

Looking at the man page, this also seems to be OK (if this interval is
interpreted as a timeout, which can be longer but not shorter than expected).

However, building a timebase for an application by setitimer() has definitely
changed, so every code relying on the interval really being averaged
correctly is now a little bit broken.

Is this intended or some side effect of other recent changes ?

--
Kari Hämeenaho
-
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:59    [W:0.014 / U:2.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site