[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ITS#3950



Kurt D. Zeilenga wrote:
At present, we only replace sched_yield(2) on Linux as
the replacements are non-portable. If other operating
systems are known to have problem sched_yield(2)
implementations, I suggest filing a separate ITS with
details and suggested replacement.

Sigh... select() seems to be about 5-6x slower than HAVE_NANOSLEEP on my Linux 2.6 system with current HEAD. Not sure why I didn't see such a drastic difference before, but it's quite noticable on test008 and test039. Perhaps the added Bind load pushed it over a threshold...

Okay, I've committed a basic detection code for REPLACE_SCHED_YIELD as well as updated replacement code. Currently uses select(2), but can be switched to nanosleep(2).

I've only tested on FreeBSD4 where this is a no-op.
Now pushing to a Linux box for real testing.
nanosleep(2) should work on Solaris (at least 8, 9 and 10) as well.

--
Igor

-- -- Howard Chu Chief Architect, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc OpenLDAP Core Team http://www.openldap.org/project/