Before this patch the idle time of a core was increased by the amount of busy time of thread that was moved out. No assumption was made as to how the remaining threads, would behave during next scheduling period. This approach is fine, as over multiple scheduling periods we'd arrive at a point where threads could do no more work or all cores would be busy. Yet this requires multiple scheduling periods to sort out the threads. Later in the series core_load will be used to determine, when to start moving threads out of the core. So changing this assumption will allow for faster responses to thread load, at cost of sometimes spreading threads too much briefly. With this patch, we are assuming that threads remaining on the core will do proportionally the same amount of work during next scheduling period. See an example illustrating the change: Before moving Thread1 Thread1 Busy 80 Idle 20 Load 80% Thread2 Busy 60 Idle 40 Load 60% Core Busy 140 Idle 60 Load 70% After moving Thread1 out (original code) Core Busy 140-80=60 Idle 60+80=140 Load 30% After moving Thread1 out (this patch) Core Busy 140-80=60 Idle 60-20=40 Load 60% Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I1f347983449b2fde476dab360c4df689965ca3ea Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8279 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Maciej Szwed <maciej.szwed@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> |
||
---|---|---|
.. | ||
app_rpc.c | ||
app.c | ||
dpdk_governor.c | ||
gscheduler.c | ||
log_rpc.c | ||
Makefile | ||
reactor.c | ||
scheduler_dynamic.c | ||
scheduler_static.c | ||
spdk_event.map |