From: Laura Flores Date: Mon, 27 Feb 2023 23:55:43 +0000 (-0600) Subject: Merge pull request #49482 from amathuria/wip-amathuria-mclock-high-prio-queue X-Git-Tag: v18.1.0~277 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fac345d9fe621ab32346745e7c237e1b0ce30375;p=ceph.git Merge pull request #49482 from amathuria/wip-amathuria-mclock-high-prio-queue mClock: Add ability to handle high priority operations --- fac345d9fe621ab32346745e7c237e1b0ce30375 diff --cc src/osd/scheduler/mClockScheduler.h index dbacc348e6f10,088df31ee190c..053dd1e87fd75 --- a/src/osd/scheduler/mClockScheduler.h +++ b/src/osd/scheduler/mClockScheduler.h @@@ -146,9 -155,21 +158,22 @@@ class mClockScheduler : public OpSchedu }; } + static unsigned int get_io_prio_cut(CephContext *cct) { + if (cct->_conf->osd_op_queue_cut_off == "debug_random") { + std::random_device rd; + std::mt19937 random_gen(rd()); + return (random_gen() % 2 < 1) ? CEPH_MSG_PRIO_HIGH : CEPH_MSG_PRIO_LOW; + } else if (cct->_conf->osd_op_queue_cut_off == "high") { + return CEPH_MSG_PRIO_HIGH; + } else { + // default / catch-all is 'low' + return CEPH_MSG_PRIO_LOW; + } + } + public: - mClockScheduler(CephContext *cct, uint32_t num_shards, bool is_rotational); + mClockScheduler(CephContext *cct, int whoami, uint32_t num_shards, + int shard_id, bool is_rotational, MonClient *monc); ~mClockScheduler() override; // Set the max osd capacity in iops