From 500cb1636578c30e1bb9f190bb951c3605abf881 Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Wed, 21 Apr 2021 20:05:52 +0800 Subject: [PATCH] LU-13440 obdclass: server qos penalty miscaculated Server qos penalty calculation uses active target count, but it should use server count, which will make it larger than expected, then weight of targets are often 0, and finally cause MDT0 is often chosen in qos allocation. Lustre-change: https://review.whamcloud.com/43385 Lustre-commit: 0ccce7ecb72f847f4235a513424d90119edad7ca Fixes: 45222b2ef ("LU-12624 obdclass: lu_tgt_descs cleanup") Signed-off-by: Lai Siyao Change-Id: I1982363e4ff74c7344dd5e07d04e29214afa8a7f Reviewed-on: https://review.whamcloud.com/43399 Tested-by: jenkins Reviewed-by: Andreas Dilger --- lustre/obdclass/lu_tgt_descs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/lu_tgt_descs.c b/lustre/obdclass/lu_tgt_descs.c index f15e18b..c96e018 100644 --- a/lustre/obdclass/lu_tgt_descs.c +++ b/lustre/obdclass/lu_tgt_descs.c @@ -644,7 +644,7 @@ int ltd_qos_update(struct lu_tgt_descs *ltd, struct lu_tgt_desc *tgt, ltq->ltq_penalty += ltq->ltq_penalty_per_obj * ltd->ltd_lov_desc.ld_active_tgt_count; svr->lsq_penalty += svr->lsq_penalty_per_obj * - ltd->ltd_lov_desc.ld_active_tgt_count; + qos->lq_active_svr_count; /* Decrease all MDS penalties */ list_for_each_entry(svr, &qos->lq_svr_list, lsq_svr_list) { -- 1.8.3.1