<p></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/hbilling/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hbilling">@hbilling</a> - I went through the code and for now I pushed a commit based on your remarks, defining macros for increment/decrement guarded by dst group lock. The increment is in a single place, decrement in two places, so I am not sure if using an atomic variable there will give any significant gain. When I will get some time for more testing, I will play with variants. The <code>ds_get_leastloaded()</code> was also updated to use the dst group lock.</p>
<p>Test and if all ok, report back and it can be backported.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2322#issuecomment-630767354">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNSGDQTZRWQ3BZ4SK3RSJW4DANCNFSM4M5V5VYA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZIHIAFFXW3ESTM3MW3RSJW4DA5CNFSM4M5V5VYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEWML56Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2322#issuecomment-630767354",
"url": "https://github.com/kamailio/kamailio/issues/2322#issuecomment-630767354",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>