0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-18 19:35:20 +00:00

fixup! fixup! IO: Allow to take new loops if the thread is hot, but only one at time

This commit is contained in:
Maria Matejka 2024-06-27 14:28:49 +02:00
parent 825be30115
commit 4d502e934a

View File

@ -683,8 +683,8 @@ birdloop_take(struct birdloop_pickup_group *group)
if (this_thread->busy_active &&
(group->thread_busy_count < group->thread_count) &&
(this_thread->loop_count > 1) &&
!EMPTY_LIST(group->loops) &&
birdloop_hot_potato(HEAD(group->loops)))
(EMPTY_LIST(group->loops) ||
!birdloop_hot_potato(HEAD(group->loops))))
{
THREAD_TRACE(DL_SCHEDULING, "Loop drop requested (tbc=%d, tc=%d, lc=%d)",
group->thread_busy_count, group->thread_count, this_thread->loop_count);