]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
fixup! fixup! IO: Allow to take new loops if the thread is hot, but only one at time
authorMaria Matejka <mq@ucw.cz>
Thu, 27 Jun 2024 12:28:49 +0000 (14:28 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 27 Jun 2024 12:28:49 +0000 (14:28 +0200)
sysdep/unix/io-loop.c

index 0a362ce1db6a0213a710ba7fd23cd21889caae57..bbe4dc2b0b34e3d057aa03ad19ac3287fb4f68ce 100644 (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);