Re: severe jitter experienced with "select()" in linux 2.6.14-rt22

From: Gautam Thaker
Date: Fri Dec 16 2005 - 00:40:04 EST


Steven Rostedt wrote:

Please always CC Ingo Molnar on all -rt related issues. And Thomas
Gleixner and John Stultz on timer issues with -rt. (CC John on timer
issues in mainline too).


Will do so in future, did not know anyone else well enough.


Is there any requirement that select must sleep the full time? At least
have you checked the value of the timeout to see if there was reported
time left? The return value wont be zero. I believe that the select my
return early with reported time left.




Yes, select is permitted to return before full timeout value, but on an idle, fast machine one hopes this does not happen too too often. And one also hopes that overruns are not too frequent. However, the results I get were, as can be seen from the select histogram, rather all over.

The simple answer is that the select system call uses the non high
resolution timers. There's really no reason to use select for timing.
That's really just a side effect of the system call. If you need
accurate timing, that's what nanosleep is for. IIRC, others on LKML
have stated that it is considered bad programming to use select as a
timer when nanosleep is available.


well, there are a large number of applications that we have that use select(). These include CORBA ORBs etc and we would like to run them and get the benefits of excellent RT properties of -rt kernel. It would be too too difficult for us, at least for now, to rewrite an ORB in such a way that it does not use any select() but instead uses nanosleep(). I assume high resolution timers must be more expensive - that is why they do not get used by select(). But there are cases where I don't mind paying the extra overhead, if any, to obtain good behaviour out of select().

So, what you show is what I would expect.


Sigh, but thanks for the comments.

-- Steve



Gautam


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