public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gautam Thaker <gthaker@comcast.net>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	john stultz <johnstul@us.ibm.com>
Subject: Re: severe jitter experienced with "select()" in linux 2.6.14-rt22
Date: Fri, 16 Dec 2005 00:40:01 -0500	[thread overview]
Message-ID: <43A25331.8000306@comcast.net> (raw)
In-Reply-To: <1134702598.13138.113.camel@localhost.localdomain>

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



  reply	other threads:[~2005-12-16  5:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-16  1:06 severe jitter experienced with "select()" in linux 2.6.14-rt22 Gautam Thaker
2005-12-16  3:09 ` Steven Rostedt
2005-12-16  5:40   ` Gautam Thaker [this message]
2005-12-16  3:30 ` Lee Revell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43A25331.8000306@comcast.net \
    --to=gthaker@comcast.net \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox