mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 20:55:25 +00:00
zebra: resched dp thread if output queue limit hit
If the dataplane thread hits the work limit while processing the
output queue for any given provider, we now explicitly reschedule
the thread.
Otherwise, if the number of items in the output queue is greater than
the work limit, draining of that output queue is dependent on new
dataplane work.
Routes which are not drained from the output queue are stuck with
the 'q' flag, so this is a similar issue to that observed in
164d8e8608
.
Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
This commit is contained in:
parent
fb1e954880
commit
f1595ce439
@ -4537,6 +4537,7 @@ static int dplane_thread_loop(struct thread *event)
|
||||
struct zebra_dplane_ctx *ctx, *tctx;
|
||||
int limit, counter, error_counter;
|
||||
uint64_t curr, high;
|
||||
bool reschedule = false;
|
||||
|
||||
/* Capture work limit per cycle */
|
||||
limit = zdplane_info.dg_updates_per_cycle;
|
||||
@ -4673,6 +4674,9 @@ static int dplane_thread_loop(struct thread *event)
|
||||
|
||||
dplane_provider_unlock(prov);
|
||||
|
||||
if (counter >= limit)
|
||||
reschedule = true;
|
||||
|
||||
if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
|
||||
zlog_debug("dplane dequeues %d completed work from provider %s",
|
||||
counter, dplane_provider_get_name(prov));
|
||||
@ -4683,6 +4687,13 @@ static int dplane_thread_loop(struct thread *event)
|
||||
DPLANE_UNLOCK();
|
||||
}
|
||||
|
||||
/*
|
||||
* We hit the work limit while processing at least one provider's
|
||||
* output queue - ensure we come back and finish it.
|
||||
*/
|
||||
if (reschedule)
|
||||
dplane_provider_work_ready();
|
||||
|
||||
/* After all providers have been serviced, enqueue any completed
|
||||
* work and any errors back to zebra so it can process the results.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user