From 4d502e934a5b3e83f95fd5200dcfbd8754bc15cc Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 27 Jun 2024 14:28:49 +0200 Subject: [PATCH] fixup! fixup! IO: Allow to take new loops if the thread is hot, but only one at time --- sysdep/unix/io-loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c index 0a362ce1..bbe4dc2b 100644 --- a/sysdep/unix/io-loop.c +++ b/sysdep/unix/io-loop.c @@ -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);