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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 4 16:52:04 CST 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13011 
====================================================================== 
Reported By:                jpgrayson
Assigned To:                svnbot
====================================================================== 
Project:                    Asterisk
Issue ID:                   13011
Category:                   Channels/chan_iax2
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-07-07 14:01 CDT
Last Modified:              2008-11-04 16:52 CST
====================================================================== 
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-11-04 16:52 svnbot         Status                   feedback => resolved
2008-11-04 16:52 svnbot         Resolution               open => fixed       
2008-11-04 16:52 svnbot         Assigned To               => svnbot          
======================================================================




More information about the asterisk-bugs mailing list