mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 20:58:44 +00:00
IO: Allow to take new loops if the thread is hot, but only one at time
This commit is contained in:
parent
18d069d663
commit
2bf28e790e
@ -678,9 +678,6 @@ birdloop_take(struct birdloop_pickup_group *group)
|
||||
{
|
||||
struct birdloop *loop = NULL;
|
||||
|
||||
if (birdloop_hot_potato(this_thread->meta))
|
||||
return;
|
||||
|
||||
LOCK_DOMAIN(attrs, group->domain);
|
||||
|
||||
if (this_thread->busy_active &&
|
||||
@ -743,7 +740,9 @@ birdloop_take(struct birdloop_pickup_group *group)
|
||||
if (group->thread_busy_count < group->thread_count)
|
||||
thread_count -= group->thread_busy_count;
|
||||
|
||||
uint assign = 1 + group->loop_unassigned_count / thread_count;
|
||||
uint assign = birdloop_hot_potato(this_thread->meta) ? 1 :
|
||||
1 + group->loop_unassigned_count / thread_count;
|
||||
|
||||
for (uint i=0; !EMPTY_LIST(group->loops) && i<assign; i++)
|
||||
{
|
||||
loop = SKIP_BACK(struct birdloop, n, HEAD(group->loops));
|
||||
|
Loading…
Reference in New Issue
Block a user