lkml.org 
[lkml]   [2006]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: select takes too much time
On 4/13/06, linux-os (Dick Johnson) <linux-os@analogic.com> wrote:
>
> On Thu, 13 Apr 2006, Ram Gupta wrote:
>
> > On 4/13/06, Michal Schmidt <xschmi00@stud.feec.vutbr.cz> wrote:
> >> Ram Gupta wrote:
> >>> I am using 2.5.45 kernel but I believe the same would be the true
> >>> for the latest kernel too.
> >>
> >> Are you just assuming this, or did you actually try a recent kernel?
> >>
> >> Michal
> >>
> >
> > I didn't get a chance to try it on a recent kernel yet but I believe
> > it to be so though I may be wrong
> >
> > Ram
> > -
>
> Simple program here shows that you may be right! In principle,
> I should be able to multiply the loop-count by 10 and divide
> the sleep time by 10, still resulting in 1-second total time
> through the loop. Not so! Changing the value, marked "Change this" to
> a smaller value doesn't affect the time very much. It is as though
> the sleep time is always at least 1000 microseconds. If this is
> correct, then there should be some kind of warning that the time
> can't be less than the HZ value, or whatever is limiting it.

Doesn't sys_select() just use schedule_timeout() eventually? <checks>
yes, sys_select() -> core_sys_select() -> do_select() ->
schedule_timeout(). Presuming there is any value stored in the timeout
parameter, you're going to sleep at least a jiffy which is 1/HZ. If
HZ=1000 (or 1024), I'd guess that 1000 us as a minimum would be
expected.

Thanks,
Nish
-
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: 2006-04-13 23:21    [W:0.061 / U:2.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site