Loading
gscheduler: fix divide-by-zero error
If gscheduler is activated and gets a chance to balance() before all cores have an spdk_thread assigned, the total_tsc for that core would be 0, and calculate_busy_pct() would divide by zero causing a SIGFPE. Fixes issue #3550. Signed-off-by:Jim Harris <jim.harris@samsung.com> Change-Id: I5b21bbbd3fb7448edd6d929a36a77b9fbd9d0e43 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25200 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Michal Berger <michal.berger@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Alliswell <hisunzhenliang@outlook.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by:
Changpeng Liu <changpeliu@tencent.com>