I see there are quite a few calls to ldap_pvt_thread_yield() in slapd's code; one is in syncprov.c, two in connection.c, five in daemon.c and a bit in back-{ldap,meta}/bind.c; just one in back-{ldap,meta}/search.c.
The ones I know about (because I worked a those pieces of code; talking
about the proxy backends) are there essentially as a workaround to force
scheduling of a waiting thread when releasing and reaquiring a mutex. Should they be removed as well?
-- -- 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/