From: Samuel Just Date: Thu, 6 Apr 2023 05:57:48 +0000 (-0700) Subject: osd/: add MSG_OSD_PG_(BACKFILL|BACKFILL_REMOVE|SCAN) as recovery messages X-Git-Tag: v18.1.0~122^2~10 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5d16e375abc1f5a7c5c3a646a2290b04954bfa11;p=ceph-ci.git osd/: add MSG_OSD_PG_(BACKFILL|BACKFILL_REMOVE|SCAN) as recovery messages Otherwise, these end up as PGOpItem and therefore as immediate: class PGOpItem : public PGOpQueueable { ... op_scheduler_class get_scheduler_class() const final { auto type = op->get_req()->get_type(); if (type == CEPH_MSG_OSD_OP || type == CEPH_MSG_OSD_BACKOFF) { return op_scheduler_class::client; } else { return op_scheduler_class::immediate; } } ... }; This was probably causing a bunch of extra interference with client ops. Signed-off-by: Samuel Just --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 8857eaf884f..0d8d5cf3856 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -13885,6 +13885,12 @@ uint64_t PrimaryLogPG::recover_backfill( MOSDPGScan::OP_SCAN_GET_DIGEST, pg_whoami, e, get_last_peering_reset(), spg_t(info.pgid.pgid, bt.shard), pbi.end, hobject_t()); + + if (cct->_conf->osd_op_queue == "mclock_scheduler") { + /* This guard preserves legacy WeightedPriorityQueue behavior for + * now, but should be removed after Reef */ + m->set_priority(recovery_state.get_recovery_op_priority()); + } osd->send_message_osd_cluster(bt.osd, m, get_osdmap_epoch()); ceph_assert(waiting_on_backfill.find(bt) == waiting_on_backfill.end()); waiting_on_backfill.insert(bt); @@ -14052,6 +14058,11 @@ uint64_t PrimaryLogPG::recover_backfill( m = reqs[peer] = new MOSDPGBackfillRemove( spg_t(info.pgid.pgid, peer.shard), get_osdmap_epoch()); + if (cct->_conf->osd_op_queue == "mclock_scheduler") { + /* This guard preserves legacy WeightedPriorityQueue behavior for + * now, but should be removed after Reef */ + m->set_priority(recovery_state.get_recovery_op_priority()); + } } m->ls.push_back(make_pair(oid, v)); @@ -14136,6 +14147,13 @@ uint64_t PrimaryLogPG::recover_backfill( } m->last_backfill = pinfo.last_backfill; m->stats = pinfo.stats; + + if (cct->_conf->osd_op_queue == "mclock_scheduler") { + /* This guard preserves legacy WeightedPriorityQueue behavior for + * now, but should be removed after Reef */ + m->set_priority(recovery_state.get_recovery_op_priority()); + } + osd->send_message_osd_cluster(bt.osd, m, get_osdmap_epoch()); dout(10) << " peer " << bt << " num_objects now " << pinfo.stats.stats.sum.num_objects diff --git a/src/osd/scheduler/OpSchedulerItem.h b/src/osd/scheduler/OpSchedulerItem.h index d8339353bfb..00389c4b637 100644 --- a/src/osd/scheduler/OpSchedulerItem.h +++ b/src/osd/scheduler/OpSchedulerItem.h @@ -577,6 +577,9 @@ public: case MSG_OSD_PG_PUSH: case MSG_OSD_PG_PUSH_REPLY: case MSG_OSD_PG_PULL: + case MSG_OSD_PG_BACKFILL: + case MSG_OSD_PG_BACKFILL_REMOVE: + case MSG_OSD_PG_SCAN: return true; default: return false;