mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-23 02:01:55 +00:00
fixup! IO: Allow to take new loops if the thread is hot, but only one at time
This commit is contained in:
parent
5288e22d22
commit
825be30115
@ -706,7 +706,7 @@ birdloop_take(struct birdloop_pickup_group *group)
|
|||||||
birdloop_set_thread(loop, NULL, group);
|
birdloop_set_thread(loop, NULL, group);
|
||||||
|
|
||||||
dropped++;
|
dropped++;
|
||||||
if (dropped * dropped > this_thread->loop_count)
|
if ((dropped * dropped) / 2 > this_thread->loop_count)
|
||||||
{
|
{
|
||||||
birdloop_leave(loop);
|
birdloop_leave(loop);
|
||||||
|
|
||||||
@ -764,10 +764,12 @@ birdloop_take(struct birdloop_pickup_group *group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bird_thread_pickup_next(group);
|
bird_thread_pickup_next(group);
|
||||||
|
|
||||||
|
if (assign)
|
||||||
|
this_thread->meta->last_transition_ns = ns_now();
|
||||||
}
|
}
|
||||||
|
|
||||||
UNLOCK_DOMAIN(attrs, group->domain);
|
UNLOCK_DOMAIN(attrs, group->domain);
|
||||||
this_thread->meta->last_transition_ns = ns_now();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user