0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 01:54:08 +00:00

No page flush before polling

The maximum amount of locally kept pages is 128 so we can just
well keep the half-meg of RAM allocated and prepared for future use.
This commit is contained in:
Maria Matejka 2024-06-18 11:02:51 +02:00
parent a1405a5bc7
commit dda37842dc

View File

@ -879,16 +879,13 @@ bird_thread_main(void *arg)
int idle_force = (timeout < 0) || (timeout > 300);
int busy_now = (timeout < 5) && !idle_force;
/* Nothing to do right now, flush local hot page cache */
/* Nothing to do right now but there may be some loops for pickup */
if (idle_force)
{
LOCK_DOMAIN(attrs, thr->group->domain);
if (!EMPTY_LIST(thr->group->loops))
timeout = 0;
UNLOCK_DOMAIN(attrs, thr->group->domain);
if (timeout)
flush_local_pages();
}
if (busy_now && !thr->busy_active && (++thr->busy_counter == 4))