<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">(1 comment)<br>> WHY???<br>> Why take something that works and submit a patch that breaks<br>stuff?<br>The current round-robin method does not take the current<br>taskprocessor load into consideration when distributing requests.<br>Using the least-size method the request goes to the taskprocessor<br>that is servicing the least number of active tasks at the current<br>time.<br>The long running task on round-robin method can slowdown a fast<br>running tasks.</p></blockquote></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">You are trying to optimize something that isn't used very much so<br>you get very little benefit with the change. This is only going to<br>affect something that doesn't care which task processor something<br>gets queued onto.</p><p style="white-space: pre-wrap; word-wrap: break-word;">i.e., Only things which go on the pjsip/default-xxxxxxx<br>serializers.<br></p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I found 24 usage of ast_sip_push_task*(NULL<br>For example one of them send_initial_notify_all<br>which fires initial unsolicited MWI NOTIFY messages when we're fully booted.<br>This one is very long run task.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I made a patch which added a new dial-plan function PJSIP_PARSE_URI which must run on one of the PJSIP threads. The simple way is to run on default PJSIP serializers.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The dial-plan functions should complete asap.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So this patch tries to minimize an affect between tasks on default serializers.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">><br>> What does this patch break?</p><ul><li>A simple selection routine is now more complicated for little</li><li>benefit.</li><li>The new selection routine calls the get count function more than</li><li>once per serializer. Since Asterisk is multi-threaded you can get</li><li>different values each time it is called.</li><li>Coding guidelines</li></ul></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;"><br>Fixed * Coding guidelines</p><p><a href="https://gerrit.asterisk.org/10587">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10587">change 10587</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10587"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I7b8d8cc2c2490494f579374b6af0a4868e3a37cd </div>
<div style="display:none"> Gerrit-Change-Number: 10587 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 05 Nov 2018 21:01:01 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>