diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2022-04-05 15:45:58 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2022-06-03 12:28:32 +0300 |
commit | adea2d98970e6c90d55a76a4b426648bf4f84513 (patch) | |
tree | e8901a9e4571ecf83deac240d1384d941d668c0b /platform/linux-generic/odp_schedule_basic.c | |
parent | 0f58523630d2fd6e2055838b6ece47d63a2c710d (diff) |
linux-gen: sched: next spread after no input packets
When packet input poll does not return packets, move to the
next spread instead of the next group/priority. Since packet
input queues are not removed from scheduling when they are
empty, this branch may be taken often. Scheduling is more
fair (to other queues in the same group/priority) when the
remaining spreads are not skipped.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-generic/odp_schedule_basic.c')
-rw-r--r-- | platform/linux-generic/odp_schedule_basic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c index 6e3336c00..96b5e18a7 100644 --- a/platform/linux-generic/odp_schedule_basic.c +++ b/platform/linux-generic/odp_schedule_basic.c @@ -1339,8 +1339,10 @@ static inline int schedule_grp_prio(odp_queue_t *out_queue, odp_event_t out_ev[] * packet input queue even when it is empty. */ ring_u32_enq(ring, ring_mask, qi); - /* Continue scheduling from the next group/priority */ - return 0; + /* Continue scheduling from the next spread */ + i++; + spr++; + continue; } /* Process packets from an atomic or parallel queue right away. */ |