[asterisk-dev] [Code Review] Move event cache updates into event processing thread.
Russell Bryant
reviewboard at asterisk.org
Sun Jul 29 19:23:08 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2066/
-----------------------------------------------------------
Review request for Asterisk Developers.
Summary
-------
Prior to this patch, updating the device state cache was done by the thread that originated the event. It would update the cache and then queue the event up for another thread to dispatch. This thread moves the cache updating part to be in the same thread as event dispatching.
I was working with someone on a heavily loaded Asterisk system and while reviewing backtraces of the system while it was having problems, I noticed that there were a lot of threads contending for the lock on the event cache. By simply moving this into a single thread, this helped performance *a lot* and alleviated some deadlock-like symptoms.
This patch was important to this system as it helps fix some issues that were problems there. I would like to put it in Asterisk 1.8, but it's not really an obvious candidate. In addition to code review, I'd like some opinions on which branch this can go in.
Diffs
-----
/trunk/main/event.c 370535
Diff: https://reviewboard.asterisk.org/r/2066/diff
Testing
-------
Many thousands of calls (on Asterisk 1.8, but the code is pretty much the same in this area)
Thanks,
Russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120730/63e5419a/attachment.htm>
More information about the asterisk-dev
mailing list