]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip.c: Make taskprocessor scheduling algorithm pick the shortest queue
authorAlexei Gradinari <alex2grad@gmail.com>
Mon, 5 Nov 2018 18:44:28 +0000 (13:44 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 5 Nov 2018 23:12:25 +0000 (17:12 -0600)
commit158214c1a0687e2639be459fd328931810bf27b2
tree36cf573ba475008df20660c1674394b93025e354
parent8b965c386ab98a3bafa33f4ed06ffc1114349f69
res_pjsip.c: Make taskprocessor scheduling algorithm pick the shortest queue

The current round-robin method does not take the current taskprocessor
load into consideration when distributing requests.  Using the least-size
method the request goes to the taskprocessor that is servicing the least
number of active tasks at the current time.

Longer running tasks with the round-robin method can delay processing
tasks.

* Change the algorithm from round-robin to least-size for picking the
PJSIP taskprocessor from the default serializer pool.

Change-Id: I7b8d8cc2c2490494f579374b6af0a4868e3a37cd
res/res_pjsip.c