From 387f067ff5e55e2cd3818062429896684dfe4683 Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Thu, 10 Jun 2021 13:30:48 +0300 Subject: linux-gen: sched: dynamic spread load balance Estimate current load on a spread ring as number of queues allocated to it divided by number of threads preferring the spread. Each thread runs a series of spread load balance checks starting at every 1M schedule calls. This helps especially when there are less threads in a group than the number of spreads configured. Scheduler moves more queues to those spread rings that have more thread capacity. This works best when all threads and queues are equally active. Signed-off-by: Petri Savolainen Reviewed-by: Matias Elo --- config/odp-linux-generic.conf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/odp-linux-generic.conf b/config/odp-linux-generic.conf index 61e54f88b..01c622fe8 100644 --- a/config/odp-linux-generic.conf +++ b/config/odp-linux-generic.conf @@ -16,7 +16,7 @@ # Mandatory fields odp_implementation = "linux-generic" -config_file_version = "0.1.17" +config_file_version = "0.1.18" # System options system: { @@ -167,6 +167,14 @@ sched_basic: { # counts as non-preferred queues are served less often prio_spread_weight = 63 + # Dynamic load balance of scheduler internal queues + # + # When enabled (1), scheduler checks periodically internal queue load levels and + # moves event queues from one spread to another in order to even out the loads. + # Load level of an internal queue (group/prio/spread) is measures as number of + # event queues allocated to it, divided by number of threads serving it. + load_balance = 1 + # Burst size configuration per priority. The first array element # represents the highest queue priority. The scheduler tries to get # burst_size_default[prio] events from a queue and stashes those that -- cgit v1.2.3