lkml.org 
[lkml]   [2005]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sched_yield() makes OpenLDAP slow
From
Date
On Sat, 2005-08-20 at 11:38 -0700, Howard Chu wrote:
> Nick Piggin wrote:
> > Robert Hancock wrote:
> > > I fail to see how sched_yield is going to be very helpful in this
> > > situation. Since that call can sleep from a range of time ranging
> > > from zero to a long time, it's going to give unpredictable results.
>
> > Well, not sleep technically, but yield the CPU for some undefined
> > amount of time.
>
> Since the slapd server was not written to run in realtime, nor is it
> commonly run on realtime operating systems, I don't believe predictable
> timing here is a criteria we care about. One could say the same of
> sigsuspend() by the way - it can pause a process for a range of time
> ranging from zero to a long time. Should we tell application writers not
> to use this function either, regardless of whether the developer thinks
> they have a good reason to use it?

Of course not. We should tell them that if they use sigsuspend() they
cannot assume that the process will not wake up immediately.

Lee


-
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-08-20 23:52    [W:0.069 / U:16.464 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site