[asterisk-bugs] [Asterisk 0013011]: [patch] find_idle_thread() uses spin wait

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 6 08:46:22 CDT 2008


The following issue requires your FEEDBACK. 
====================================================================== 
http://bugs.digium.com/view.php?id=13011 
====================================================================== 
Reported By:                jpgrayson
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13011
Category:                   Channels/chan_iax2
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-07-07 14:01 CDT
Last Modified:              2008-10-06 08:46 CDT
====================================================================== 
Summary:                    [patch] find_idle_thread() uses spin wait
Description: 
When find_idle_thread() creates a new dynamic thread, it spins waiting for
the newly created thread to "signal" that it is up, running, and ready to
go. On a lightly loaded system, the child thread will be scheduled promptly
and the parent thread will thus probably not spin too much.

On a heavily loaded system, it might be possible for the parent thread to
be rescheduled many times prior to the child thread becoming ready. This is
a waste of CPU when the system can least afford it.

Instead of spin waiting, a condition variable can be used. This would make
the parent thread efficiently block until the child thread becomes ready.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-06 08:46 russell        Status                   new => feedback     
======================================================================




More information about the asterisk-bugs mailing list