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

Re: (ITS#3950) sched_yield() considered harmful

bernie@develer.com wrote:
> Full_Name: Bernardo Innocenti
> Version: 2.2.26 to 2.3.5, possibly others
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> Calling sched_yield() makes slapd slow down considerably
> under load since kernel 2.6.
> See:
>   http://www.ussg.iu.edu/hypermail/linux/kernel/0508.2/0516.html
Thanks for pointing this out. I'm not sure why we ever used 
sched_yield() in the first place, it was known to cause headaches on the 
Solaris build as well. We should probably leave it as a last resort, and 
prefer pthread_yield() instead.

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