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

Re: ITS#3950

Aaron Richton wrote:
I reworked most of the yield() calls in daemon.c, and those changes are
in RE23. However, the BDB library itself makes yield() calls as well,
which I ignored. It seems we should apply the patch in ITS#3950 after all.

I'd just like to be wary of possible degradation on systems that comply with the spirit of the spec. For example, the Solaris 9 man page:

     The sched_yield() function  forces  the  running  thread  to
     relinquish the processor until the process again becomes the
     head of its process list. It takes no arguments.

Some of these systems (say, maybe, Solaris 9 :) also have a yielding
select(). In this case, I'd want to use whatever gives the best results
(behaviorally first, with performance considered). It's not clear to me
that the ITS#3950 patch does that as is.

Disclaimer: I'm not saying that select() is definitely a performance hit.
I didn't benchmark this at all.

Overall I agree with this concern. I don't know quite how we would detect this in configure, but perhaps we should restrict this patch to the 2.6 Linux kernel for now #if HAS_BROKEN_YIELD or somesuch.

 -- 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/