diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-10-10 20:08:32 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-10-11 09:37:37 -0400 |
| commit | 8aa97a439fc21c66132fdaf8ce0113e16801be04 (patch) | |
| tree | 56e0c98d15cec93a28ddf2e36b1b2a8cdb94bdd6 | |
| parent | 963792e8c5ba834f1f7bb2555e90aa4b2ff6f33c (diff) | |
zebra: Slow down fpm_process_queue
When the fpm_process_queue has run out of space
but has written to the fpm output buffer, schedule
it to wake up immediately, as that the write will go out
pretty much immediately, since it was scheduled first.
If the fpm_process_queue has not written to the output
buffer then delay the processing by 10 milliseconds to
allow a possibly backed up write processing to have a
chance to complete it's work.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | zebra/dplane_fpm_nl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c index 0e54952eea..4fb57d84d9 100644 --- a/zebra/dplane_fpm_nl.c +++ b/zebra/dplane_fpm_nl.c @@ -1512,8 +1512,12 @@ static void fpm_process_queue(struct event *t) /* Re-schedule if we ran out of buffer space */ if (no_bufs) { - event_add_event(fnc->fthread->master, fpm_process_queue, fnc, 0, - &fnc->t_dequeue); + if (processed_contexts) + event_add_event(fnc->fthread->master, fpm_process_queue, fnc, 0, + &fnc->t_dequeue); + else + event_add_timer_msec(fnc->fthread->master, fpm_process_queue, fnc, 10, + &fnc->t_dequeue); event_add_timer(fnc->fthread->master, fpm_process_wedged, fnc, DPLANE_FPM_NL_WEDGIE_TIME, &fnc->t_wedged); } else |
