Whamcloud - gitweb
LU-13440 obdclass: server qos penalty miscaculated 85/43385/1
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 21 Apr 2021 12:05:52 +0000 (20:05 +0800)
committerLai Siyao <lai.siyao@whamcloud.com>
Wed, 21 Apr 2021 12:05:52 +0000 (20:05 +0800)
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.

Fixes: 45222b2ef ("LU-12624 obdclass: lu_tgt_descs cleanup")
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I1982363e4ff74c7344dd5e07d04e29214afa8a7f

lustre/obdclass/lu_tgt_descs.c

index 06415ff..bdffc78 100644 (file)
@@ -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) {