[Asterisk-code-review] res pjsip mwi: fix unsolicited mwi blocks PJSIP stack (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Jul 26 11:01:28 CDT 2016


Richard Mudgett has posted comments on this change.

Change subject: res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/3320/2/res/res_pjsip_mwi.c
File res/res_pjsip_mwi.c:

Line 1217: 	ast_sip_push_task(get_mwi_serializer(), send_initial_notify_all, NULL);
> I think the MWI is low priority task.
I think you have a misunderstanding of the pjsip taskprocessors/serializers and how they determine what to execute next because there are NO priority levels.  None of the threads used by Asterisk have different priority levels either.  ALL pjsip serializers are executed by a thread pool configured by pjsip.conf.  The pjsip thread pool is controlled by two taskprocessors named "SIP" and "SIP-control".  Which serializer starts executing next is determined by the thread pool's taskprocessor task queue.  When a pjsip serializer starts executing its tasks it executes all queued tasks before releasing the thread back to the thread pool.

Please see http://blogs.asterisk.org/2016/07/13/asterisk-task-processor-queue-size-warnings/ about what the different pjsip serializers are used for.

Since v13.10.0 the pjsip/default serializers no longer handle incoming REGISTER or initial incoming INVITE messages.  Those are now processed by the new pjsip/distributor serializers (of which there are 31).  In fact, v13.10.0 may eliminate the initial purpose for this patch because the pjsip/default serializers are not used for much anymore.  However, I do see that the send_initial_notify_all() can create a serializer backlog as I've already described.


-- 
To view, visit https://gerrit.asterisk.org/3320
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list